Block tcp/25 Services (telnet host 25)

Block tcp/25 Services (telnet host 25)

Post by cypherpunk » Fri, 19 May 2006 18:34:20



Hi Dudes

How can we block the tcp/25 Services with tcp wrapper under Solaris10?
The entry in /etc/hosts.deny "smtp: ALL" dosn't work...

We can still connect with -> telnet host 25

thanks for your support

regards

 
 
 

Block tcp/25 Services (telnet host 25)

Post by j.goe.. » Fri, 19 May 2006 18:40:08



> How can we block the tcp/25 Services with tcp wrapper under Solaris10?
> The entry in /etc/hosts.deny "smtp: ALL" dosn't work...
> We can still connect with -> telnet host 25

That's because sendmail isn't called by inetd but does the listening
on tcp/25 itself, so tcp wrappers aren't involved.

What you're looking for is in /etc/mail/sendmail.cf:
# SMTP daemon options
O DaemonPortOptions=Port=smtp,Addr=127.0.0.1,Name=MTA
O DaemonPortOptions=Port=587, Name=MSA, M=E

HTH,
Jens
--
Jens Goerke, mobilcom Server Systeme
Postadresse: Mobilcom, Hollerstr. 126, 24782 Buedelsdorf
Besucheradresse: Am Friedrichsbrunnen, Ahlmannhallen
Tel: +49-(0)4331-69-5505 Fax: +49-(0)4331-69-5588

 
 
 

Block tcp/25 Services (telnet host 25)

Post by Martin Pau » Fri, 19 May 2006 20:48:53




>> How can we block the tcp/25 Services with tcp wrapper under Solaris10?
>> The entry in /etc/hosts.deny "smtp: ALL" dosn't work...
>> We can still connect with -> telnet host 25

> That's because sendmail isn't called by inetd but does the listening
> on tcp/25 itself, so tcp wrappers aren't involved.

That's only partly true, as sendmail in Solaris 10 has been linked
against libwrap.so (see ldd /usr/lib/sendmail), so it *does* use
TCP wrappers.

To the OP: I haven't tried, but I think you need to specify "sendmail"
instead of "smtp" in the hosts.deny file.

mp.
--
Systems Administrator | Institute of Scientific Computing | Univ. of Vienna

 
 
 

Block tcp/25 Services (telnet host 25)

Post by cypherpunk » Fri, 19 May 2006 22:24:16


Hi mp

The same problem with sendmail entry in /etc/hosts.deny file.
we can still connect to host with telenet host 25

cu

 
 
 

Block tcp/25 Services (telnet host 25)

Post by Casper H.S. Di » Fri, 19 May 2006 22:33:28



>Hi mp
>The same problem with sendmail entry in /etc/hosts.deny file.
>we can still connect to host with telenet host 25

Tcp wrappers need to be enabled in sendmail and inetd.

Casper

 
 
 

Block tcp/25 Services (telnet host 25)

Post by Tony Curti » Fri, 19 May 2006 22:39:27


>> On 18 May 2006 06:24:16 -0700,

> Hi mp The same problem with sendmail entry in
> /etc/hosts.deny file.  we can still connect to host with
> telenet host 25

Is there something in hosts.allow that is letting the
connection in (so that hosts.deny never gets looked at)?

hth
t

 
 
 

Block tcp/25 Services (telnet host 25)

Post by Darren Dunha » Sat, 20 May 2006 01:25:02



> The same problem with sendmail entry in /etc/hosts.deny file.
> we can still connect to host with telenet host 25

I don't think that sendmail will drop the TCP connection on a libwrap
denied host (which is the behavior you get with inetd tcp wrappers).  I
think it will send a 550 when you try to set up the SMTP connection
inside.

Have you tried to send mail through the telnet, or are you just checking
whether the TCP connection succeeds?

--

Senior Technical Consultant         TAOS            http://www.taos.com/
Got some Dr Pepper?                           San Francisco, CA bay area
         < This line left intentionally blank to confuse you. >

 
 
 

Block tcp/25 Services (telnet host 25)

Post by cypherpunk » Sat, 20 May 2006 15:39:15


Hi

I dont think so...

Here our Files


swat: LOCAL
sshd: ALL
in.ftpd: LOCAL 160.59.200.0/255.255.255.0 160.59.206.78

in.telnetd: ALL
in.ftpd: ALL
in.rlogind: ALL
sendmail: ALL
ALL: ALL

cu

 
 
 

Block tcp/25 Services (telnet host 25)

Post by cypherpunk » Sat, 20 May 2006 17:21:51


Hi

Ok. Now it works

We can connect to port 25, but we cant send emails

550 5.0.0 Access denied

thank you

 
 
 

Block tcp/25 Services (telnet host 25)

Post by Gary Mill » Sat, 20 May 2006 22:05:29



Quote:>Ok. Now it works
>We can connect to port 25, but we cant send emails
>550 5.0.0 Access denied

Why don't you just shut down the SMTP server?

--
-Gary Mills-    -Unix Support-    -U of M Academic Computing and Networking-

 
 
 

1. URGANT HELP NEEDED: Blocking telnet on port 25

Hi,

I am forwarding all incoming mail to an internal mail server using ip
tables and a linux firewall.

I am using DNAT to forward all incoming mail:

iptables -A PREROUTING -t nat -p tcp -d 172.16.1.98 --dport 25 -j DNAT --to
X.X.X.X:25

Now this works fine but opens a hole since anyone can telnet to port 25
and have a connection.  How can I prevent this from happening?

Thanks

Stephen

2. Is "sscanf" callable within kernel?

3. Any X.25 pad software and X.25 card run on Linux?

4. iptables giving headaches - multiple interfaces / logging?

5. difference between Sunlink x.25 8.0.2 and Solastice x.25 9.2 in lapb_stioc

6. icewm taskbar

7. Wanted: X.25-Ethernet or X.25-Token Ring gateway OR SLIP driver

8. Strage lock ups with Xfree86 4.2.0

9. ReiserFS 2.5 Update Patch Set 25 of 25

10. /etc/inetd wrecks my ability to tredir 25 25 [aRe: tredir ...]

11. term, tredir 25 25, smail?

12. PPP & X.25 (not AX.25)

13. why i can not telnet my host 25 ports??