Typical home-networking xDSL setup on a TG782 router/gateway. Hosts on the local private network are allocated IP-addresses in the range of and can get to WAN through the aforementioned combo device at (the gw for LAN). I'm running Debian on one of the machines ( and want to add an IP-addr. to the same interface, but from a different network (i.e. and be able to route packets to the outside network just like I'm doing now with the current setup.

Here are the details of ifconfig:

wlan2 Link encap:Ethernet HWaddr 94:0c:6d:8d:28:0f
inet addr: Bcast: Mask:

Output of route -n:

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface UG 0 0 0 wlan2 U 2 0 0 wlan2

So, let's say I will do this:

ip addr add dev wlan2

What changes would I need to make locally, on this machine, so that I would get this working:

telnet -b google.com 80


My assumption is that I would probably need to do some form of internal NAT with iptables, in order to have this properly routed or.. ?


1 Answer 1


iptables -t nat -A POSTROUTING -o wlan2 -j SNAT -s --to-source

Seems to do just that:

# telnet -b google.com 80
Connected to arn06s02-in-f1.1e100.net.
Escape character is '^]'.

You must log in to answer this question.

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