LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-23-2005, 01:11 PM   #1
GUIPenguin
Member
 
Registered: Aug 2004
Location: Maine
Distribution: Gentoo Linux
Posts: 239

Rep: Reputation: 30
/etc/hosts.allow question


If I add to /etc/hosts.allow

Code:
 sshd: 254.254.
would that work to block sshd to everything but 254.254.xxx.xxx ?
I am not going to be using iptables for a specific reason

because I already see the lines
Code:
bootpd: 0.0.0.0
tftpd:    192.168.
This is fedora core 3 with ltsp

Last edited by GUIPenguin; 05-23-2005 at 02:52 PM.
 
Old 05-23-2005, 01:55 PM   #2
BrianK
Senior Member
 
Registered: Mar 2002
Location: Los Angeles, CA
Distribution: Debian, Ubuntu
Posts: 1,334

Rep: Reputation: 51
While I believe that does work, I know this to work:

Code:
portmap:192.168.0.0/255.255.255.0
(giving an ip & mask).

you can also give an ip/mask & it will mask just like the above, i.e. 192.168.0.0/32

there are other options as well.

there are man pages on hosts.allow & hosts.deny (man hosts.allow) - give 'em a look.
 
Old 05-23-2005, 07:01 PM   #3
twantrd
Senior Member
 
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,440

Rep: Reputation: 52
Quote:
would that work to block sshd to everything but 254.254.xxx.xxx
First thing I would do is look up hosts.[deny|allow] in google. However, I believe that hosts.allow takes precedence over hosts.deny. So this *should* work:

hosts.allow:
sshd: <your ip/your netmask>

hosts.deny:
sshd: all

That should block all incoming ssh connections and allow only the ip address.

-twantrd

Last edited by twantrd; 05-24-2005 at 12:42 AM.
 
Old 05-23-2005, 08:51 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
The actual man-page is
man 5 hosts_access

And both notations (on top of a few others ;}) are
equally acceptable!


Cheers,
Tink
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
hosts.allow & hosts.deny question... jonc Linux - Security 9 03-05-2005 09:41 PM
embarassing hosts question ryedunn Linux - Newbie 2 03-30-2004 12:43 PM
Question about /etc/hosts and Samba gvaught Linux - Networking 12 12-17-2003 02:53 PM
Hosts File Question LinuxGeek Linux - General 5 08-12-2002 01:03 AM
/etc/hosts question viv Linux - Newbie 1 04-17-2002 05:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration