8

can't find a way to forward in iptables for specific mac address

view full story
linux-howto

http://serverfault.com – I use a linux Centos 6.3 as an Internet gateway with NAT. I want to allow a specific host to have access to Internet, but not with IP address, because IP may change due to dhcp, and use a rule for a specific mac address. I used the following but it does not work iptables -t nat -A POSTROUTING -o $INTERNETDEVICE -j MASQUERADE iptables -A INPUT -i $INTERNETDEVICE -m state --state ESTABLISHED,RELATED -j ACCEPT iptables -A FORWARD -d 10.1.1.0/24 -j ACCEPT iptables -A FORWARD -m mac --mac-source {my mac address} -j ACCEPT where INTERNETDEVICE is the ppp device to internet if instead of 4th rul (HowTos)