Re: Disabling telnet on Linux iptables firewall
- From: responder <no@xxxxxxxxxxxx>
- Date: Sun, 29 Oct 2006 00:28:05 -0400
C. J. Clegg wrote:
On my Fedora Core 2 server, 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?
That doesn't seem to be working.
(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".)
I would like to be able to limit all outgoing traffic to http, ssh, and
email, nothing else.
chkconfig gives the option to determine what gets started when your system
starts. If you are trying to stop telnet into your machine, you should
use this to prevent telnet from listening (starting), in addition to the
firewall.
To prevent outgoing telnet, disable (rename or remove) telnet on all your
machines. That's a start, but doesn't prevent users or processes from
installing or starting their own telnet clients. You can allow or deny
service (incoming or outgoing) to or from any port with iptables (more
below), but it is much more difficult if even possible to allow or deny
any particular protocol (http, ssh, pop3, imap, etc.).
Work out the iptables rules you think you need to allow or block whatever
traffic to or from whatever ports you are interested in, and put them into
a separate shell script with an
"iptables -I ..."
command in the script, which places these rules at the start of the
rulesets in memory. Run this script manually at startup, or automatically
after everything else has started, possibly from /etc/rc.d/rc.local.
I do not believe there is any particular or easy specific way to allow or
deny any particular protocol, in or out, using iptables alone. The rules
have many options, but it has no way to examine or evaluate protocols used.
.
- References:
- Disabling telnet on Linux iptables firewall
- From: C. J. Clegg
- Disabling telnet on Linux iptables firewall
- Prev by Date: Re: Security -- for Linux Server
- Next by Date: Re: Disabling telnet on Linux iptables firewall
- Previous by thread: Disabling telnet on Linux iptables firewall
- Next by thread: Re: Disabling telnet on Linux iptables firewall
- Index(es):
Relevant Pages
|