You can configure a Ubuntu system as a gateway in order to share it's internet connection (maybe via WLAN or tethering) with other computers on the network.
Open /etc/sysctl.conf
Uncomment the line
net.ipv4.ip_forward=1
Reload using sudo sysctl -p /etc/sysctl.conf
online_device
with the name of the network device that provides the internet connectionlan_device
with the name of the network device that connects to the LANsudo
Add the gateway PC as the default gateway using
sudo ip route del default
sudo ip route add default via <ip of gateway pc>
Add another DNS server to /etc/resolv.conf
, for example
nameserver 8.8.8.8