<div dir="ltr"><div><div><div><div><div><div><div><div><div>Yesterday whilst arguing with the VPN, I discovered that whilst people on guest WiFi had no LAN access (intentional) they had unfettered access to the router admin, ssh etc. YIKES!<br></div>So I went and checked the iptables rules. I'll be the first to admit that I struggle with networking, but I now have things fixed and am really confused as to what the problem was and why the fix works!<br></div><br></div>Old rules, sourced from <a href="http://www.alexlaird.com/2013/03/dd-wrt-guest-wireless/">http://www.alexlaird.com/2013/03/dd-wrt-guest-wireless/</a> :<br>    iptables -I INPUT -i br1 -p tcp --dport telnet -j REJECT --reject-with tcp-reset<br>    iptables -I INPUT -i br1 -p tcp --dport ssh -j REJECT --reject-with tcp-reset<br>    iptables -I INPUT -i br1 -p tcp --dport www -j REJECT --reject-with tcp-reset<br>    iptables -I INPUT -i br1 -p tcp --dport https -j REJECT --reject-with tcp-reset<br></div>To my basic understanding these say "Anything coming in from br1 (guest WiFi) on those four ports, tell it where to go in no uncertain terms. Implicitly everything else is OK".<br></div>Yet jumping on to the router's web admin page was permitted. Whut?<br><br></div>New rules, sourced from <a href="http://www.stevejenkins.com/blog/2013/01/use-dd-wrt-to-create-a-guest-wifi-network-and-block-skype/">http://www.stevejenkins.com/blog/2013/01/use-dd-wrt-to-create-a-guest-wifi-network-and-block-skype/</a> :<br>    iptables -I INPUT -i br1 -m state --state NEW -j DROP<br>    iptables -I INPUT -i br1 -p udp --dport 67 -j ACCEPT<br>    iptables -I INPUT -i br1 -p udp --dport 53 -j ACCEPT<br>    iptables -I INPUT -i br1 -p tcp --dport 53 -j ACCEPT<br></div>This to me says "Deny everything from br1 that's going to the router, expect DHCP and DNS". Only confusion I have with these is the order, shouldn't the "DROP" be the last entry?<br><br></div>What am I missing/totally failing to understand here?<br><br></div><div>I've got a few other questions, but I think they're best left until I've fried a few more neurons reading docs and can ask better questions at a LUG meet.<br><br></div><div>J.</div></div>