Re: IP Tables blocking SMTP



Leonard wrote:
Hi,

I need to block SMTP relay attempts from a specific IP on my lan.
I have setup the sendmail access file to only allow relaying from the
machines that need to but still get relaying denied in my maillog.

That is what you should get, otherwise the relay had worked for the blocked host.


Is there a way I can use IP tables to block relaying attempts from a specific IP address ?

Yes, you can block IPs with iptables, but you shouldn't, as your SMTP will not anymore be following the standard and can end in a blacklist as badly configured SMTP.

iptables -A INPUT -p 17 -s 1.1.1.2 -d 1.1.1.1/255.255.255.0 --dport 1 -j DROP

I do suggest you use logrotate on your system, that way your logfiles won't grow forever.

For checking the logs, I do suggest you take a look at logwatch, it will put together a nice report and if you see something fishy there, then you can move over to manually check the log files.

--

//Aho
.



Relevant Pages

  • IP Tables blocking SMTP
    ... I need to block SMTP relay attempts from a specific IP on my lan. ... I have setup the sendmail access file to only allow relaying from the ... machines that need to but still get relaying denied in my maillog. ...
    (alt.linux)
  • Re: Security issue with relaying
    ... from \inetpub\mailroot\Queue folder from all accounts. ... This will prevent II SMTP ... > issue where I have all relaying stopped, except for authorised users (as we ... > Via the security logs of the sever (secuiryt audit log) I ahve been able to ...
    (microsoft.public.exchange.admin)
  • Re: SMTP strange behavior
    ... In your post you say that relaying is prohibited to this internal domain. ... configuration should be straightforward, ... the internal server allows. ... > server and SMTP gateway to my internal network. ...
    (microsoft.public.inetserver.iis.smtp_nntp)
  • Re: relaying denied
    ... Relaying Denied errors usually come from trying to use an email (sending, ... SMTP) server that doesn't belong to the ISP you're connected to. ... SMTP Relay Blocking Error Message When You Send Messages ...
    (microsoft.public.outlook.general)
  • Re: Urgent Information - Relaying Spam (Mail Server)
    ... Block Open SMTP Relaying and Clean Up Exchange Server SMTP ... Workstations>> can scan any attachments they need to open with their workstation AV ...
    (microsoft.public.windows.server.sbs)