Page 1 of 1

Block port 25 [how to?]

Posted: Thu Mar 15, 2012 5:28 am
by tman
Hello,

I need to block outgoing connection on port 25 (spambots on some computers within local network; all computers are currently configured to use port 587 for email protocol)

I don't know how to achieve that.

I use TP-Link WD1043ND router with gargoyle 1.5.2 installed.

I would very appreciate for help and/or suggestions.

(sorry for my english:)

Best regards,

Tom

Re: Block port 25 [how to?]

Posted: Thu Mar 15, 2012 10:00 am
by mix
You can probably do this in /etc/config/firewall, but I am not really sure of the exact syntax. I do know it's a much longer syntax than this... Here is how to do it with iptables. ssh into your router. Execute the command below:

/usr/sbin/iptables -A FORWARD -p TCP --dport 25 -j DROP