tomp_gl
asked on
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
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
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
If sendmail is using a random source port then I should probably accept all OUTPUT packets... are there any security ramifications to this?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Essentially I want to do this:
# only let sendmail out
iptables -A OUTPUT -p tcp --dport 25 -j ACCEPT
iptables -P OUTPUT DROP
# let nothing in
iptables -P INPUT DROP
But will I need to keep any other source ports open for OUTPUT packets?
Thanks