[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Help needed on block SMTP



You need something as this in your linux router/firewall box:

#!/bin/sh
ip_mail_srv=a.b.c.d

iptables -t filter -A INPUT -d $ip_mail_srv -p tcp --dport 25 --syn -j
ACCEPT
iptables -t filter -A INPUT -p tcp --dport 25 --syn -j DROP

#the same in FORWARD chain:

iptables -t filter -A FORWARD -d $ip_mail_srv -p tcp --dport 25 --syn -j
ACCEPT
iptables -t filter -A FORWARD -p tcp --dport 25 --syn -j DROP

You need integrate this rules into your firewall scripts, for example
upon -A could you need -I <line_number>



Dave Ewart escribió:

On Wednesday, 18.05.2005 at 08:37 +0530, shyam hirurkar wrote:


Hi All,

I have a mail server running on Qmail and a gateway running on
IPtables on kernel 2.4.26.

Now my question is: I want to block SMTP port on the firewall. Also
allow only SMTP connection to my mail server.


I assume this is a followup to your previous post.  You are going to
need to give us *much* more information before we can help.  Show us
your current IP ruleset, tell us about your network topology: how your
mail server relates to your firewall, their network interface addresses
etc.

Dave.

--
   Samuel Díaz García
    Director Gerente
ArcosCom Wireless, S.L.L.

CIF: B11828068
c/ Romero Gago, 19
Arcos de la Frontera
11630 - Cadiz

http://www.arcoscom.com

mailto:samueldg@arcoscom.com
msn: samueldg@arcoscom.com

Móvil: 651 93 72 48
Tlfn.: 956 70 13 15
Fax:   956 70 34 83

begin:vcard
fn;quoted-printable:Samuel D=C3=ADaz Garc=C3=ADa
n;quoted-printable:D=C3=ADaz Garc=C3=ADa;Samuel
org:ArcosCom Wireless, S.L.L.;I+D+I
adr;quoted-printable;quoted-printable:;;c/ Romero Gago, 19;Arcos de la Frontera;C=C3=A1diz;11630;Espa=C3=B1a
email;internet:samueldg@arcoscom.com
title:Director Gerente
tel;work:956 70 13 15
tel;fax:956 70 34 83
tel;cell:651 937 248
x-mozilla-html:FALSE
url:http://www.arcoscom.com
version:2.1
end:vcard


Reply to: