Question : What port does sendmail send mail on?

Hi,

I would like to completely firewall my linux box's internet interface. I want to block all incoming packets and accept only outgoing packets from sendmail, as this is the only service that should need internet access. Does sendmail use port 25 for outgoing packets? Do I need any other ports open?

Also, when setting an iptables rule for OUTPUT packets, do I refer to the source port instead of the destination port?

Thanks

Answer : What port does sendmail send mail on?

SMTP uses a destination port of 25 and a source port that is 1024 or greater.

For OUTPUT you use the destination port.

Typically for IP protocols the source port is a random port that is 1024 or greater.  You typically filter/block based on destination port.

Random Solutions  
 
programming4us programming4us