Could you please just give one sample to deny Internet access from 192.168.1.100
(The LAN access Internet via NAT through WAN Port PPPOE protocol)
I have tried to read iptables Tutorial but still confused
Thank you
TuanND from VIETNAM
I am at work and can not test this example for you, but I think you are looking for something like this to be added to your /etc/firewall.user file, under the section labelled Port Forwarding.
iptables -A forwarding_rule -i $LAN -s 192.168.1.100 -o $WAN --mac-source xx:xx:xx:xx:xx:xx -j DROP
Hope you can use 'vi'. If you want to test this rule manually before editing firewall.user. Just type the above line in replacing $LAN with LAN interface name (nvram show |grep lan_ifname) and the same with $WAN. Manually testing first is the safest way as a reboot will restore the iptables back to orginal if there is a mistake.
Hope this helps, if the --mac-source returns an error you may need to install the iptables-extra plugin, like I said before I can not test this for you at the moment.
EDIT:
Just a thought, I better tell you what the line is doing -A forwarding_rule (add a rule to the forwarding_rule table (created by the /etc/init.d/S45firewall script)) -i (input interface) -s (source IP) -o (output interface) --mac-source (match extention (does the rule if MAC is matched)) -j DROP (jump to DROP and move to next packet). You can remove the --mac-source option if you want the rule to match anything that comes from the LAN interface with an IP of 192.168.1.100 regardless of MAC address. Or you can keep the -mac-source match-extention and remove the -s 192.168.1.100 option if you want to match to the MAC address only regardless of IP address (be carefull of this as it may stop all LAN to WAN traffic if the --mac-source extention isn't included in the iptable package installed on the router).
(Last edited by zaphod on 2 Oct 2005, 00:09)