LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices

Reply
 
Search this Thread
Old 01-27-2005, 05:33 AM   #1
explorer1979
Member
 
Registered: Aug 2001
Location: Hong Kong, China
Distribution: CentOS, Red Hat, Mandrake, Debian
Posts: 88

Rep: Reputation: 15
Question How to setup a host.deny and host.allow for SSH?


Hi all,

I am using Windows XP with the cygwin + OpenSSH to build up a SFTP Server.

But for some reason, I don't want to build a linux box for a standalone SFTP server.

I want to ask, how to set up a host.deny for deny all internet user can login to the SFTP server, but if I want just one IP, for example, 203.88.122.166 this IP can login to the SFTP Server?

How to? And need enter what inform to the host.deny and host.allow file??

thx

Jimmy Chan
---------------
http://www.wusogorphoto.net
 
Old 01-28-2005, 03:12 PM   #2
peacebwitchu
Member
 
Registered: Apr 2004
Distribution: Debian
Posts: 185

Rep: Reputation: 30
hosts.deny


sshd ALL EXCEPT 192.168.254.2
 
Old 01-31-2005, 06:28 PM   #3
Moloko
Member
 
Registered: Mar 2004
Location: Netherlands
Distribution: Debian
Posts: 729

Rep: Reputation: 30
The hosts.allow file is checked before hosts.deny, so make sure the rules don't conflict. Allowing things should be in the allow-file, like:
sshd: xxx.xxx.xxx.xxx or
sshd: ALL: spawn (echo "Attempt from %h %a to %d at `date` by %u" | tee -a /var/log/sshd.log)

The last line also logs any attempts.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Deny a host access to all services objorkum Linux - Networking 5 08-17-2007 03:54 PM
Host in hosts.deny able to access HTTP service mikebalcos Linux - Networking 1 08-12-2004 10:40 AM
Quick quide to host.allow / deny? dtournas Linux - General 2 06-19-2004 07:17 AM
How do I deny host? Inexactitude Linux - Security 3 02-22-2004 03:00 PM
host.deny is very wierd ForumKid Linux - Security 1 12-26-2001 07:09 PM


All times are GMT -5. The time now is 06:14 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration