Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to do the following:

Machine1 Kubuntu 8.04 desktop wired internet  Cable modem  
Machine2 eepc701 Xubuntu 1O.04 wired machine1 cross ethernet cable  
Machine3 nokia n900 wireless to machine2  Wifi card machine2 mode master  

Routing tables:

Machine1     *        U     0      0        0 eth0  
XX.XX.160.0     *        U     0      0        0 eth2  
link-local      *          U     1000   0        0 eth2  
default         UG    0      0        0 eth2  

Machine2   *      U     0      0        0 ath0     *        U     0      0        0 eth0  
default         user.local         UG    0      0        0 eth0  

Machine3   *      U     0      0        0 wlan0  

Doing: iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

On machine2 , dhcp3 server on machine2 ip adress well delivered to #3

ping #3 -> ath0 ok  
ping #2 -> wlan0 ok  
ping #2 -> #1 ok  
ping #1 -> ath0 ok  

ping #3 -> #2 eth0  network unreachable  
ping #1 -> #3  network unreachable      

Access point is open. What is failing?

share|improve this question
What Operating System on Machine 1 and 2? – William Hilsum Sep 2 '11 at 9:53

I have tried to tidy up your question slightly, but, it is very confusing. If you just want to share internet between three machines that are set the way you want, there is no need to mess around with the routing table or subnets. If I have misunderstood, please can you rephrase your question.

Firstly, I would highly recommend you get yourself a Wireless Router. This will save yourself a lot of trouble and it will have extra benefits such as allowing your N900 to work with machine two off.

If you already have a internet cable modem (guessing one ethernet port), get yourself a RJ45/Ethernet router and stick the current modem in to it. You should then be able to share with all the computers without problems.

The more complicated route is, if internet is working fine on Machine one and two, consider just installing a "virtual router" on machine 2 - Options are Virtual Router or Connectify

share|improve this answer
I added the OSThanks for the answer. – gully Sep 2 '11 at 10:46
It was a matter tosave the money and use that old eepc and learn in the process. – gully Sep 2 '11 at 10:48
sorry for truncking my answer. So I will take your advice. but I am still wondering why it's not working; – gully Sep 2 '11 at 10:50
by the way I learn a lot ;) – gully Sep 2 '11 at 10:54

Why you have a subnet mask ending with 192 (/26) that is entirely in an /24?

If you want to use a double NAT, the two ranges must be non-overlapping.

The machine in the bigger subnet (machine 1) will not know automatically that it has to route the packet through machine 2. Machine 1 will only use ARP to find your, which will always fail because the latter is not on the wired ethernet. You have to change the routing table on machine 1 so it knows a part of is only reachable through machine 2.

An alternative solution is to create a bridge between the wired and wireless network on machine 2 so that IP will think it's one subnet. This is easy to do under Windows, but involves a lot of manually configuration under Linux ( ).

share|improve this answer

A thousand thanks to

As follows:

Machine1    *      UH    0      0        0 eth0     *        U     0      0        0 eth0  
XX.XX.160.0     *        U     0      0        0 eth2  
link-local      *          U     1000   0        0 eth2  
default         UG    0      0        0 eth2 

Machine2     *        U     0      0        0 eth0    *        U     0      0        0 ath0  
default         user-local         UG    0      0        0 eth0 


option subnet-mask;  
option broadcast-adress;  
#next line was the last I changed before singing "Deo Gratias"  
>option routers;  
option domain-name-servers,; 

subnet netmask {  
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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