Skip to content
On this page

Internet Sharing

Windows

  1. First, open the Network Manager and identify your Olive network interface (in this case, "network 39"). Also, identify the interface through which you wish to share the internet (in this context, the WiFi).

Bridge Image

  1. Next, access the settings of the WiFi network. Navigate to the appropriate tab and select the "Internet Sharing" feature. From the dropdown list, choose the Olive interface (in this instance, "network 39").

a3!

  1. Once again, open the network settings for the Olive interface. Proceed to the IPv4 configuration and modify the predefined IP to match the default gateway IP of the Olive interface. By default, the gateway value is set to 10.42.0.1.

a4!

a5!

a6!

  1. Now, SSH into the Olive component and attempt to ping 8.8.8.8 to verify your internet connection. If successful, you should observe a successful ping response as shown below:

a7!

  1. If you wish to change the default gateway on the device, follow these commands on the Olive component:
sudo ip route del default #delete the default route
sudo ip route add default via 10.42.0.1 #add the default route
sudo ip route del default #delete the default route
sudo ip route add default via 10.42.0.1 #add the default route

Linux Method 1 (Wi-Fi internet sharing)

  1. Install Necessary Packages: Before you begin, ensure you have the net-tools and dnsmasq packages installed. These tools will help manage and share the network.
sudo apt update
sudo apt install net-tools dnsmasq
sudo apt update
sudo apt install net-tools dnsmasq
  1. Use the following command to list your network interfaces:
ifconfig
ifconfig
  1. Use the commands bellow to share your wifi internet (here wlp3s0) with you olive interface (here enxa80000000001). Replace this two interface names according to your wifi and olive interface name.
sudo sysctl -w net.ipv4.ip_forward=1
sudo iptables -t nat -A POSTROUTING -o wlp3s0 -j MASQUERADE
sudo iptables -A FORWARD -i enxa80000000001 -o wlp3s0 -j ACCEPT
sudo apt-get install iptables-persistent
sudo sysctl -w net.ipv4.ip_forward=1
sudo iptables -t nat -A POSTROUTING -o wlp3s0 -j MASQUERADE
sudo iptables -A FORWARD -i enxa80000000001 -o wlp3s0 -j ACCEPT
sudo apt-get install iptables-persistent
  1. Verify Internet Sharing: SSH into the Olive component and try pinging an external server to check if the internet connection is shared:
sudo ping 8.8.8.8
sudo ping 8.8.8.8

Linux Method 2 (Lan internet sharing)

  1. Install Necessary Packages: Before you begin, ensure you have the net-tools and dnsmasq packages installed. These tools will help manage and share the network.
sudo apt update
sudo apt install net-tools dnsmasq
sudo apt update
sudo apt install net-tools dnsmasq
  1. Use the following command to list your network interfaces:
ifconfig
ifconfig
  1. Configure Network Manager:
  • Open the Network Manager GUI.
  • Identify your primary internet connection.
  • Also, identify the Olive network interface you wish to share the internet with.
  1. Set Up Internet Sharing:
  • Go to the settings of your primary internet connection.
  • Navigate to the "IPv4" tab.
  • Choose the "Shared to other computers" option from the "Method" dropdown menu.
  1. Restart Network Manager: After making the changes, restart the Network Manager to apply them:
sudo service network-manager restart
sudo service network-manager restart
  1. Verify Internet Sharing: SSH into the Olive component and try pinging an external server to check if the internet connection is shared:
sudo ping 8.8.8.8
sudo ping 8.8.8.8