Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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

I have an eee running ArchLinux with wireless access to the Internet. I want to use it as the WAN input for an Asus RT-G32 router into which it is hardwired. The router in turn is hooked up to a 64-bit Windows PC for which I cannot obtain a wireless NIC.

Can someone explain, in general, (1) the iptables rules to be set on the eee which are required to share Internet connection with the router, and (2) the router settings required to use the eee as the WAN connection?

Note: IP of the eee is 192.168.1.x and the router is assigning subnet of 192.168.x.x, so I need instructions on how to ensure there are no IP 'collisions'.

share|improve this question

Is this right your network topology?

PriveNet--->AsusRouter---->eee ---wireless-----> >---Internet

If right, eee and AsusRouter may be haved ip address of 192.168.1.x.

In example,

192.168.x.x---> (192.168.x.x)AsusRouter(>( A)---->Internet

In this case,

(1) iptables setting in eee

If the network card name of ip is eth0 and the network card name of GlobalIP A is eth1, use the following command. (network card name will be verified with 'ifconfig' command.)

iptables -t nat -A POSTROUTING -o eth1 -j SNAT --to-source GlobalIP A

If GlobalIP A isn't static ip, may be use the following.

iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE

(2)route setting in AsusRouter

eee is default gateway of AsusRouter. So you must set default route in AsusRouter.

route add default gw

share|improve this answer
Yes, you mapped it out right. I will check out your rules, but was wondering, do I hook the eee to the WAN port of the Asus router, or just one of the numbered ports and set up the Windows machine to use eee as proxy? – Stephen Oct 6 '11 at 13:32

You must log in to answer this question.

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