| access point | wi-fi     |   my machine |           | 2-nd machine |
               | | --------- | | Ethernet  |              |
Internet ----  |  |           | | --------- |  |

I have 2 computers:

The 1-st is connected to the Internet through wi-fi interface. Network: default gateway: (IP of the wi-fi access point). It works.

Now I have another machine, connected to mine through the Ethernet interface. Here I have a second network with 2 machines:

  1. mine
  2. other machine: default gateway

ping between the machines works. ping google.com on the 2-nd machine doesn't work.

Now I need to setup the route between the internal and external networks on my machine.

I don't know, what default gateway should I setup on machine for network, because my machine is the default gateway for this network. I tried

route add mask

but it doesn't work.

IPv4 routing table
Active routes:
Network address       Network mask     Default gateway     Interface  Metrics
         On-link    276
    276         On-link    306         On-link    306         On-link    306         On-link    276         On-link    276         On-link    276         On-link    281         On-link    281         On-link    281         On-link    306         On-link    276         On-link    281         On-link    306         On-link    276         On-link    281

2 Answers 2


Your route statement isn't what you want. The router isn't the gateway for the network (which is what your route statement says-- it's flat wrong).

You'll want to place a route on the wireless router to give it a route to the network via the PC.

You'll also need to enable IP routing on the Windows 7 PC to get it to forward packets.

  • I enabled IP routing and rebooted the machine. Also I set as a default gateway for interface. But it still doesn't work. I added the current routing table to my question.
    – user4035
    Jul 7, 2014 at 7:50
  • ok I solved it by adding a route to on the access point, only now understood what you meant
    – user4035
    Jul 7, 2014 at 9:49
  • 1
    So exactly what was the command you ended up using?
    – Dave
    Mar 27, 2017 at 21:06

You must share wireless connection in your machine and set dns in 2nd machine as:

then try to ping as follows:

then ping the ip you obtained from pinging www.google.com at your machine in the 2nd machine. if you set dns correctly you must get reply in all pings.

  • Sharing the connection is what the original poster is trying to do. Just not via ICS but with a manual, much more controlled setup.
    – Hennes
    Aug 16, 2016 at 9:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.