Public domain
EXTIF="eth0"
INTIF="eth1"
INTIP="172.16.20.101"
INTMASK="255.255.255.0"
GATEWAY="172.16.20.2"
NETWORK="172.16.20.0/24"
route add ${GATEWAY} dev ${EXTIF}
route del -net ${NETWORK} dev ${EXTIF}
ifconfig ${INTIF} ${INTIP} netmask ${INTMASK}
echo 1 > /proc/sys/net/ipv4/conf/${EXTIF}/proxy_arp
EXTIF="eth0"
EXTIP="172.16.20.100"
EXTMASK="255.255.255.0"
INTIF="eth1"
INTIP="172.16.20.101"
INTMASK="255.255.255.0"
GATEWAY="172.16.20.2"
NETWORK="172.16.20.0/24"
ifconfig ${EXTIF} ${EXTIP} netmask ${EXTMASK}
route add default gw ${GATEWAY}
route add ${GATEWAY} dev ${EXTIF}
route del -net ${NETWORK} dev ${EXTIF}
ifconfig ${INTIF} ${INTIP} netmask ${INTMASK}
echo 1 > /proc/sys/net/ipv4/conf/${EXTIF}/proxy_arp
BY: Pejman Moghadam
TAG: proxy-arp
DATE: 2008-02-12 19:42:45