Re: Disabling telnet on Linux iptables firewall
- From: ibuprofin@xxxxxxxxxxxxxxxxxxxxxx (Moe Trin)
- Date: Sun, 29 Oct 2006 10:57:15 -0600
On Sat, 28 Oct 2006, in the Usenet newsgroup comp.os.linux.security, in article
<pan.2006.10.28.19.55.19.780733@xxxxxxxxx>, C. J. Clegg wrote:
On my Fedora Core 2 server,
Why are you using such an old release? FC2 was declared "unsupported"
at downloads.fedoralegacy.org in April, and there have been no updates
released since the end of March. FC6 was released this past week. Consider
updating to that.
I call up system-config-securitylevels (the GUI configuration tool for
iptables) and I tell it to disallow telnet.
That works ... no one can telnet in any longer. So far so good.
But, isn't that supposed to disable telnet'ing out, as well?
No - that's a mis-understanding on your part.
(In general it seems the iptables configuration GUI is MIGHTY limited in
the things that it can do, and yet the /etc/sysconfig/iptables file, that
gets generated by system-config-securitylevels, has tbis big caveat at the
top: "Firewall configuration written by system-config-securitylevel ...
Manual customization of this file is not recommended".)
This is normal for a GUI tool. You can easily do what the tool author
thought you might want to do, and typically have much difficulty doing
things the author didn't think you'd need, or didn't think of. This has
always been the case. As for editing the actual configuration file, the
precaution is because the tool doesn't know what your changes look like,
and may accidentally delete them when you run the tool.
I would like to be able to limit all outgoing traffic to http, ssh, and
email, nothing else.
Two choices - first is to get rid of the GUI, and write the firewall rules
yourself. There is a large amount of documentation available, starting
with the official HOWTOs, as well as Rusty Russell's "unofficial" howtos
available from http://www.iptables.org/documentation/HOWTO/. Depending
on your skill level, this may or may not be a viable option. Remember that
the 'telnet' client takes a port number as an optional parameter, and thus
can telnet _to_ any port number on the remote - whether or not there is a
server there (won't connect if there isn't, but that doesn't stop the
attempt).
The second choice is to either remove or disable the undesired clients.
Disabling them is likely the better choice - use the 'which' command to
find the binary, and then 'chmod 644' that:
[compton ~]$ which telnet
/usr/bin/telnet
[compton ~]$ su -c /bin/chmod 644 /usr/bin/telnet
Password:
[compton ~]$
In your list of allowed traffic, you don't mention 'ftp' but that is needed
to keep your system up to dates. Admittedly, this is going to be quite
difficult for FC2, but you should be aware of your responsibility.
Old guy
.
- Follow-Ups:
- Re: Disabling telnet on Linux iptables firewall
- From: C. J. Clegg
- Re: Disabling telnet on Linux iptables firewall
- From: Michael Heiming
- Re: Disabling telnet on Linux iptables firewall
- References:
- Disabling telnet on Linux iptables firewall
- From: C. J. Clegg
- Disabling telnet on Linux iptables firewall
- Prev by Date: Re: Disabling telnet on Linux iptables firewall
- Next by Date: Re: Disabling telnet on Linux iptables firewall
- Previous by thread: Re: Disabling telnet on Linux iptables firewall
- Next by thread: Re: Disabling telnet on Linux iptables firewall
- Index(es):
Relevant Pages
|