[NTLUG:Discuss] /etc/accept and /etc/reject

Rev. wRy slot0k at pogox.org
Wed Nov 6 08:30:45 CST 2002


Steve and Daphne Martindell wrote:
> I read somewhere that you can restrict who can ftp
> or telnet in to your Linux computer using these two
> files.

First: telnet bad, ssh good.

Second, it sounds like you are confusing hosts.allow and hosts.deny 
(which live in /etc and rely on services that use tcp wrappers) with 
iptables/ipchains.

> But I can't find any information on the format of these
> files. Basically I want to only allow myself to ftp/telnet
> in from my work IP address during the day, and reject everything
> else.

Just as an example:

[root at somebox etc]#cat hosts.deny

# hosts.deny    This file describes the names of the hosts which are
#               *not* allowed to use the local INET services, as decided
#               by the '/usr/sbin/tcpd' server.
#

ALL:ALL

[root at somebox etc]#cat hosts.allow

in.proftpd: you.rwo.rki.pad
sshd: you.rwo.rki.pad

> thanks,
>    Steve Martindell

man hosts.allow for more info.

Ry






More information about the Discuss mailing list