PDA

Bekijk de volledige versie : Blocking ports



miz012
29-04-2010, 12:42
Hi,

is there any easy function in oleg firmware how to BLOCK all communication on some IP except port 21?

Something in post-firewall like iptables?

thx

Ondra

Tamadite
14-05-2010, 23:34
Hi,

is there any easy function in oleg firmware how to BLOCK all communication on some IP except port 21?

Something in post-firewall like iptables?

thx

Ondra

If I understand it correctly you want to block trafic from WAN[All_IP_WAN]-->LAN[Some_IP_LAN] on all ports on Some_IP_LAN except on port 21.


iptables -I FORWARD -d [Some_IP_LAN] -j DROP
iptables -I FORWARD -p tcp --dport 21 -d [Some_IP_LAN] -j ACCEPT

See that traffic within the LAN (LAN[IP1_LAN]<-->LAN[IP2_LAN]) is not to be blocked by these rules.