Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Sun Oct 20, 2013 7:14 am 
Offline
Junior Member

Joined: Wed Oct 16, 2013 12:09 pm
Posts: 40
I put this in my jail.local file:

Code:
[postfix]
enabled  = true
port     = smtp,ssmtp
filter   = postfix
action   = mail-whois[name=postfix, dest=my@email.com]
logpath  = /var/log/mail.log
maxretry = 10


How do I add an iptables action to this? There are two possible ports, so I'm not sure what would be in the port and protocol parameters:

Code:
iptables[name=postfix, port=??, protocol=??]


Top
   
PostPosted: Sun Oct 20, 2013 5:46 pm 
Offline
Senior Member
User avatar

Joined: Sun Jan 18, 2009 2:41 pm
Posts: 830
It looks like you can have multiple actions, so something like the below would cover both ports.
Code:
action   = mail-whois[name=postfix, dest=my@email.com]
           iptables[name=postfix, port=smtp, protocol=tcp]
           iptables[name=postfix, port=ssmtp, protocol=tcp]


Neither of these services can really be accessed over UDP, so putting TCP as the protocol should cover it. For a service that can be accessed over both, you can just add extra actions having protocol=udp.


Top
   
PostPosted: Mon Oct 21, 2013 6:23 am 
Offline
Junior Member

Joined: Wed Oct 16, 2013 12:09 pm
Posts: 40
Vance wrote:
It looks like you can have multiple actions, so something like the below would cover both ports.
Code:
action   = mail-whois[name=postfix, dest=my@email.com]
           iptables[name=postfix, port=smtp, protocol=tcp]
           iptables[name=postfix, port=ssmtp, protocol=tcp]


Neither of these services can really be accessed over UDP, so putting TCP as the protocol should cover it. For a service that can be accessed over both, you can just add extra actions having protocol=udp.

Thanks, that makes sense :)


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group