I'm using tomato shibby on a router, and I'm trying to set some specific rules using iptables to set the following:

I have a server, which runs on (LAN) port 2232. Everybody from the LAN can access it. I want to make sure the server is accessible port 2232 ONLY by

I've set the following iptables rules. Like I said I'm using tomato shibby, and I've set this rules in Administration->Scripts->Firewall:

iptables -A INPUT -p tcp --dport 2232 -s -d -j ACCEPT
iptables -A INPUT -p tcp --dport 2232 -d -j DROP

The first rule should accept my client IP: to access the server running on port 2232, and the second rule should drop the packets that are sent by other IPs.

I've rebooted the router after I've set the changed, and I can still access my server, from other IPs. I've checked via ssh if the iptables were actually set by the web gui, and they did.

UPDATE: Rules, shown by iptables -L

UPDATE2: The Access Restriction does a good job in creating rules, but it looks like they are applied only to what goes through WAN. It doesn't work with restrictions inside the LAN.

ACCEPT     tcp  --       tcp dpt:2232 
DROP       tcp  --  anywhere          tcp dpt:2232 

I'm not sure if I need to somehow init the rules too, but I don't think so.

Any suggestions are appreciated.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.