Monday, October 31, 2011

Howto enable internet for ip in Centos

#eth0 – internet
#eth1 – network
echo -e “192.168.10.99 00:15:F2:16:6C:C2 dev eth1″ > /srv/mac.list
arp -f /srv/mac.list
iptables -t nat -A POSTROUTING -o eth0-j MASQUERADE
iptables -A FORWARD -i eth1 -j ACCEPT
echo 1 > /proc/sys/net/ipv4/ip_forward
#this script enable internet for ip 192.168.10.99 with MAC 00:15:F2:16:6C:C2

0 comments

Post a Comment