User:Stuart
From Openmoko
(Difference between revisions)
m |
|||
Line 1: | Line 1: | ||
− | The entry in /etc/network/interfaces. I use /26 as my home network is 192.168.0.0/24 | + | The entry in /etc/network/interfaces. I use /26 as my home network is 192.168.0.0/24. I have local nameserver. |
<pre> | <pre> | ||
allow-hotplug eth7 | allow-hotplug eth7 | ||
− | + | address 192.168.0.200 | |
− | address 192.168.0. | + | |
netmask 255.255.255.252 | netmask 255.255.255.252 | ||
up iptables -A POSTROUTING -t nat -s 192.168.0.200/26 -j MASQUERADE | up iptables -A POSTROUTING -t nat -s 192.168.0.200/26 -j MASQUERADE | ||
up echo 1 > /proc/sys/net/ipv4/ip_forward | up echo 1 > /proc/sys/net/ipv4/ip_forward | ||
down iptables -D POSTROUTING -t nat -s 192.168.0.200/26 -j MASQUERADE | down iptables -D POSTROUTING -t nat -s 192.168.0.200/26 -j MASQUERADE | ||
+ | </pre> | ||
+ | |||
+ | <pre> | ||
+ | iptables -A FORWARD --in-interface eth7 -j ACCEPT | ||
+ | iptables -A FORWARD --out-interface eth7 -j ACCEPT | ||
</pre> | </pre> |
Revision as of 11:08, 16 August 2009
The entry in /etc/network/interfaces. I use /26 as my home network is 192.168.0.0/24. I have local nameserver.
allow-hotplug eth7 address 192.168.0.200 netmask 255.255.255.252 up iptables -A POSTROUTING -t nat -s 192.168.0.200/26 -j MASQUERADE up echo 1 > /proc/sys/net/ipv4/ip_forward down iptables -D POSTROUTING -t nat -s 192.168.0.200/26 -j MASQUERADE
iptables -A FORWARD --in-interface eth7 -j ACCEPT iptables -A FORWARD --out-interface eth7 -j ACCEPT