LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 11-12-2007, 06:09 AM   #1
firefoxlinux
LQ Newbie
 
Registered: Aug 2007
Posts: 6
Blog Entries: 1

Rep: Reputation: 0
Block SSH


Hi,

i have a linux server with 2 network cards, one for internal users and other one for external users, i need to block ssh for some users from external, how can i do this, please help..

i can block a perticular user, but my reqirement is to block a user who comes from out side of our network..
 
Old 11-12-2007, 06:54 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
I think that "DenyGroups denyusergroup@!yourdomain.com" might do it. You will need to test this.
The "denyusergroup" name is an arbitrary example. I'm not certain is group@host is allowed. It might be better to instead use "AllowUsers" instead if the number of users isn't too large.
"AllowUsers john@10.0.0.0/8 sally@10.0.0.0/8 mike tim sally"
This will allow john and sally on the local 10/8 LAN, and mike, tim, & sally from anywhere. AllowUsers will also deny system user logins.

The username@host pattern refers to a local user (on the server) connecting from a remote host. It doesn't refer to a user at that host, unless that users username is the same by coincidence.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
SSH tricks -- any way to block failed attempts by IP address tensigh Linux - Security 10 06-06-2008 03:46 PM
block ping and ssh varun_saa Mandriva 1 02-08-2005 06:08 AM
hosts.deny doesn't block an SSH attempt vmattila Linux - Security 4 11-14-2004 12:18 PM
block putty.exe(ssh) with iptables jamiguel77 Linux - Networking 13 09-14-2004 10:13 AM
block SSH connection to non root users mangueJOE Linux - Networking 3 07-11-2002 03:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 09:39 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