Jump to content

block port 25 using shorewall


mudfish
 Share

Recommended Posts

Hi mudfish,

 

you can edit your /etc/shorewall/rules file and add two lines like this:

 

DROP $FW net tcp SMTP

DROP $FW net udp SMTP

 

$FW is your standard firewall zone, net is the zone you're connected to the internet with in this example. For more on zones and options, see additional info in the rules and zones file in /etc/shorewall.

 

@SoulSe: Maybe he only wants to use port 465?

 

HTH,

 

scoonma

Link to comment
Share on other sites

hi all

 

ty for the quick and informative replies.it really helps us a lot newbies gain new knowledge from experienced linux users.im a bit new to shorewall as im used to using firestarter with just a few clicks and its done.i am blocking port 25 on the firewall because i am not running a mail server..(am i doing right?i mean closing port 25 does not mean i can no longer check my email account on yahoo right?? greetz goes to scoonma,soulse and paul.

 

:thanks:

Link to comment
Share on other sites

On a server it is always a good idea to shut off the ports you don't need imho.

 

Remember that in Linux iptables is your firewall tool, things like Shorewall are just applications that address iptables. So if you can get your head around iptables you can go direct and cut out the middle-man :P

 

EDIT: Blocking off port 25 will not stop you from reading email from web-sites, no. Since that just needs your http and https ports to be open (80 and... 443... if I remember correctly)

Link to comment
Share on other sites

Just to clarify things a little, blocking ports in the INPUT chain will stop incoming connections to your machine, so blocking port 25 there will prevent outside machines to connect to your smtp port. This will not stop you from checking or sending webmails or normal mails. On the other hand, blocking ports on the OUTPUT chain will stop outgoing connections, so if you block port 25 there you will still be able to check mails but you won't be able to send mail through the standard smtp port.

Being it a server or a desktop computer it's always a good idea to block all the incoming ports and only open those you'll be using.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...