linux-config.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* SSH allow only form selected IP'
@ 2004-08-14 10:34 Kev
  2004-08-14 10:54 ` James Turnbull
  0 siblings, 1 reply; 6+ messages in thread
From: Kev @ 2004-08-14 10:34 UTC (permalink / raw)
  To: linux-admin, linux-config

hi,

i have a redhat enterprise 3 linux box, how can i configure SSH demon
only to allow SSH connections only form selected IP's ? 

i have 3 IP rangers that i need to allow, how can i do this ?

thanks a lot
Kev


------- 
Web Hosting at a cheap price, starting at $1 per month with your own domain, .COM, .NET, .LK, .ORG etc..
PHP, CGI, Perl, MySQL, Cpanel 9, POP3, POP3s, SMTP, IMAP, FTP,
http://www.orbitsl.net


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: SSH allow only form selected IP'
  2004-08-14 10:34 SSH allow only form selected IP' Kev
@ 2004-08-14 10:54 ` James Turnbull
  2004-08-14 11:18   ` Re[2]: " Kev
  0 siblings, 1 reply; 6+ messages in thread
From: James Turnbull @ 2004-08-14 10:54 UTC (permalink / raw)
  To: Kev; +Cc: linux-admin, linux-config

[-- Attachment #1: Type: text/plain, Size: 960 bytes --]

Kev wrote:

>hi,
>
>i have a redhat enterprise 3 linux box, how can i configure SSH demon
>only to allow SSH connections only form selected IP's ? 
>
>i have 3 IP rangers that i need to allow, how can i do this ?
>
>thanks a lot
>Kev
>
>
>------- 
>Web Hosting at a cheap price, starting at $1 per month with your own domain, .COM, .NET, .LK, .ORG etc..
>PHP, CGI, Perl, MySQL, Cpanel 9, POP3, POP3s, SMTP, IMAP, FTP,
>http://www.orbitsl.net
>
>-
>To unsubscribe from this list: send the line "unsubscribe linux-config" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html
>  
>
Use your firewall rules.  Something like:

iptables -A INPUT -p tcp -m state --state NEW,ESTABLISHED -s 
192.168.0.0/24 --dport 22 -j ACCEPT
iptables -A OUTPUT -p tcp -m state --state NEW,ESTABLISHED -d 
192.168.0.0/24 --sport 22 -j ACCEPT

Where 192.168.0.0/24 is the range you are allowing.

Regards

James



[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/x-pkcs7-signature, Size: 2801 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re[2]: SSH allow only form selected IP'
  2004-08-14 10:54 ` James Turnbull
@ 2004-08-14 11:18   ` Kev
  2004-08-14 11:42     ` James Turnbull
  2004-08-14 11:46     ` James Turnbull
  0 siblings, 2 replies; 6+ messages in thread
From: Kev @ 2004-08-14 11:18 UTC (permalink / raw)
  To: linux-admin, linux-config

>>
>>i have a redhat enterprise 3 linux box, how can i configure SSH demon
>>only to allow SSH connections only form selected IP's ? 
>>
>>i have 3 IP rangers that i need to allow, how can i do this ?
>>
>>thanks a lot
>>Kev
>
>>
>Use your firewall rules.  Something like:
>
>iptables -A INPUT -p tcp -m state --state NEW,ESTABLISHED -s 
>192.168.0.0/24 --dport 22 -j ACCEPT
>iptables -A OUTPUT -p tcp -m state --state NEW,ESTABLISHED -d 
>192.168.0.0/24 --sport 22 -j ACCEPT
>
>Where 192.168.0.0/24 is the range you are allowing.

anyway i can do this with the SSH config ?

i can use the iptabel rules for 2-3 IP rangers ?

------- 
Web Hosting at a cheap price, starting at $1 per month with your own domain, .COM, .NET, .LK, .ORG etc..
PHP, CGI, Perl, MySQL, Cpanel 9, POP3, POP3s, SMTP, IMAP, FTP,
http://www.orbitsl.net


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: SSH allow only form selected IP'
  2004-08-14 11:18   ` Re[2]: " Kev
@ 2004-08-14 11:42     ` James Turnbull
  2004-08-14 11:54       ` Re[2]: " Kev
  2004-08-14 11:46     ` James Turnbull
  1 sibling, 1 reply; 6+ messages in thread
From: James Turnbull @ 2004-08-14 11:42 UTC (permalink / raw)
  To: Kev; +Cc: linux-admin, linux-config

[-- Attachment #1: Type: text/plain, Size: 987 bytes --]

Kev wrote:

>>e your firewall rules.  Something like:
>>
>>iptables -A INPUT -p tcp -m state --state NEW,ESTABLISHED -s 
>>192.168.0.0/24 --dport 22 -j ACCEPT
>>iptables -A OUTPUT -p tcp -m state --state NEW,ESTABLISHED -d 
>>192.168.0.0/24 --sport 22 -j ACCEPT
>>
>>Where 192.168.0.0/24 is the range you are allowing.
>>    
>>
>
>anyway i can do this with the SSH config ?
>
>i can use the iptabel rules for 2-3 IP rangers ?
>  
>
Have a read of:  
http://www.oreilly.com/catalog/sshtdg/chapter/ch08.html#45775

The firewall rules yes you can do more than one subnet:

iptables -A INPUT -p tcp -m state --state NEW,ESTABLISHED -s 
192.168.0.0/24 --dport 22 -j ACCEPT
iptables -A OUTPUT -p tcp -m state --state NEW,ESTABLISHED -d 
192.168.0.0/24 --sport 22 -j ACCEPT

iptables -A INPUT -p tcp -m state --state NEW,ESTABLISHED -s 
10.0.0.0/24 --dport 22 -j ACCEPT
iptables -A OUTPUT -p tcp -m state --state NEW,ESTABLISHED -d 
10.0.0.0/24 --sport 22 -j ACCEPT

etc etc

Regards

James



[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/x-pkcs7-signature, Size: 2801 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: SSH allow only form selected IP'
  2004-08-14 11:18   ` Re[2]: " Kev
  2004-08-14 11:42     ` James Turnbull
@ 2004-08-14 11:46     ` James Turnbull
  1 sibling, 0 replies; 6+ messages in thread
From: James Turnbull @ 2004-08-14 11:46 UTC (permalink / raw)
  To: Kev; +Cc: linux-admin, linux-config

[-- Attachment #1: Type: text/plain, Size: 92 bytes --]

Kev wrote:

Sorry:  http://www.oreilly.com/catalog/sshtdg/chapter/ch08.html

Regards

James

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/x-pkcs7-signature, Size: 2801 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re[2]: SSH allow only form selected IP'
  2004-08-14 11:42     ` James Turnbull
@ 2004-08-14 11:54       ` Kev
  0 siblings, 0 replies; 6+ messages in thread
From: Kev @ 2004-08-14 11:54 UTC (permalink / raw)
  To: linux-admin, linux-config


>>
>>anyway i can do this with the SSH config ?
>>
>>i can use the iptabel rules for 2-3 IP rangers ?
>>  
>>
>Have a read of:  
>http://www.oreilly.com/catalog/sshtdg/chapter/ch08.html#45775
>
>The firewall rules yes you can do more than one subnet:
>
>iptables -A INPUT -p tcp -m state --state NEW,ESTABLISHED -s 
>192.168.0.0/24 --dport 22 -j ACCEPT
>iptables -A OUTPUT -p tcp -m state --state NEW,ESTABLISHED -d 
>192.168.0.0/24 --sport 22 -j ACCEPT
>
>iptables -A INPUT -p tcp -m state --state NEW,ESTABLISHED -s 
>10.0.0.0/24 --dport 22 -j ACCEPT
>iptables -A OUTPUT -p tcp -m state --state NEW,ESTABLISHED -d 
>10.0.0.0/24 --sport 22 -j ACCEPT
>

thanks a lot James, its working fine.... thanks for the help.


------- 
Web Hosting at a cheap price, starting at $1 per month with your own domain, .COM, .NET, .LK, .ORG etc..
PHP, CGI, Perl, MySQL, Cpanel 9, POP3, POP3s, SMTP, IMAP, FTP,
http://www.orbitsl.net


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-08-14 11:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-14 10:34 SSH allow only form selected IP' Kev
2004-08-14 10:54 ` James Turnbull
2004-08-14 11:18   ` Re[2]: " Kev
2004-08-14 11:42     ` James Turnbull
2004-08-14 11:54       ` Re[2]: " Kev
2004-08-14 11:46     ` James Turnbull

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).