LinuxQuestions.org
Help answer threads with 0 replies.
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 10-13-2003, 11:14 AM   #1
porous
Member
 
Registered: Oct 2003
Distribution: redhat 9
Posts: 147

Rep: Reputation: 15
how to block an ip


hi all

i am using rh9
is it possible to block specific ip's from using any of the remote
login feature ..esp telnet and ssh

i am sure it should be possible , can any one tell me how to do it

eg; if i am giving shell account to other users , but i want to ban
certain ip's for accesing the feature ...

thx in advance ...


----------------------------------------------------------------------
if darkness > light ? light : light ;
// in either case light came first
 
Old 10-13-2003, 11:55 AM   #2
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
If you know the IP address, you can block it with a rule in your iptables rule set. For example, blocking ssh:

iptables -A INPUT -p TCP -s 1.2.3.4 --dport 22 -j DROP

Just make sure the rule is placed properly in the script so it drops the connection before another rule allows it.
 
Old 10-13-2003, 02:55 PM   #3
swell
LQ Newbie
 
Registered: Jul 2003
Location: Atlanta, GA
Distribution: SuSE
Posts: 17

Rep: Reputation: 0
I think the easiest way to do it is : In /etc/hosts.deny
ALL: ***.***.***.***, ***.***.
If you just wanna disable some functions, then replace ALL with those daemon names.

Last edited by swell; 10-13-2003 at 02:57 PM.
 
  


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
block public ip space_beyond Linux - Security 6 06-04-2005 08:23 AM
IPTables and PPTPD :S (to block or not to block) thewonka Linux - Networking 0 03-24-2005 06:58 PM
help me block an ip Zac2003 Linux - Security 1 11-03-2004 09:48 PM
block-major-8 xbaez Red Hat 0 05-27-2004 11:13 PM
How to block? Obie Linux - Security 6 05-15-2004 12:27 AM

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

All times are GMT -5. The time now is 02:59 AM.

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