rendered paste body# The loopback network interface
auto lo
iface lo inet loopback
# To box0
allow-hotplug eth0
iface eth0 inet static
address 192.168.1.1
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
# To another subnet
allow-hotplug eth1
iface eth1 inet static
address 192.168.2.1
netmask 255.255.255.0
network 192.168.2.0
broadcast 192.168.2.255
# To neighboor
auto ath0
iface ath0 inet dhcp
wireless-essid Wireless
wireless-mode Managed
wireless-channel 3
wireless-ap 00:11:6B:10:A2:0A
post-up iptables -t nat -A POSTROUTING -o ath0 -j MASQUERADE
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
pre-down iptables -t nat -D POSTROUTING -o ath0 -j MASQUERADE
pre-down echo 0 > /proc/sys/net/ipv4/ip_forward