Using Ubuntu 14.04 on all machines in question,

The network starts with a modem, then a router (which goes to 2 computers working fine), then another router 192.168.150, at which point the wireless (.150) is turned on and sent 40 ft to the Machine Shop, where a computer captures the wifi signal, which works great! Full access to internet and network. I then shared the Wired Connection using Ethernet cable to feed another computer . Using the computer with full access, I have changed the settings in the "network settings" Wired to "Share to other Computers" as it says to do so in the many tutorials. The computer receiving the shared ethernet works, but only has partial access.

The Computer receiving the Shared Ethernet can remote into any computer on the network, including make changes to routers computers and modem but does not have internet access. Network settings Wired says its connected, all with all the proper ip and gateway matching the shared computers ip.

Does anyone have any suggestions, i dont understand why it only has local, but no internet

  • 1
    Can you ping google? Also check your DNS settings. Feb 11, 2016 at 8:12

2 Answers 2


Assuming it is something wrong with what you have done, here is what works for me.

We are going to configure the PC in the machine shop that receives WiFi to be a gateway and configure other devices to use this gateway to access the internet.

Here is the guide I followed. Though it is written for Arch Linux, I have tested it on Ununtu 14.04. So here it goes:

  1. Create a script named start-gateway.sh with the following content.

    sysctl net.ipv4.ip_forward=1 iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE iptables -A FORWARD -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT iptables -A FORWARD -i eth0 -o wlan0 -j ACCEPT

The script assumes that the interface which has internet is wlan0 and you need to forward packets from eth0 (your ethernet interface) to your WiFi connection. So please confirm if these are the names of the interfaces from ifconfig output.

  1. Make the script executable and you are done:

    chmod u+x start-gateway.sh

Whenever you need to start the gateway, execute the script with root privileges when connected to the WiFi:

sudo ./start-gateway.sh

Now all you have to do to get internet on other devices connected to the Ethernet LAN is to set the manually set IP configuration on those devices, giving the gateway as the IP address of your new gateway. Set DNS information correctly too. If you don't have a local DNS, use the one provided by your ISP, OpenDNS, or GoogleDNS (,

That should do the job.


Easy fix for Ubuntu 19.04:

After setting up your wired sharing connection, just install the net-tools:

sudo apt install net-tools

Then it will do the internet connection job for you.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .