Hello all...
So a little bit of context. I have been wracking my brains trying to get this working and have been very unsuccessful. I am trying to get this working using IPTables in a DD-WRT environment. I know this forum isn't specifically for DD-WRT, but since we are talking about Linux commands, I am hoping it is transferable.
Basically, by default, I am trying to block ALL PCs access to all of the internet except 3 sites (Google, Yahoo, and DD-WRT). I have one PC that I listed by MAC address that I want to have full unrestricted access.
This is what I am using (saving it under FIREWALL commands) and it doesn't seem to be working:
Code:
# Set up the chain
iptables -N wanout
iptables -I FORWARD -i `nvram get lan_ifname` -j wanout
# Exempt Machine MAC
iptables -I wanout -m mac --mac-source 00:30:18:A9:A9:C6 -j ACCEPT
# Allow everyone access to these sites (DNS lookup only happens once when rule is inserted and stays that single IP)
iptables -I wanout -d website1 -j ACCEPT
iptables -I wanout -d website2 -j ACCEPT
iptables -I wanout -d website3 -j ACCEPT
# Everything else gets blocked
iptables -A wanout -j REJECT --reject-with icmp-proto-unreachable