All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Turnbull <james@lovedthanlost.net>
To: Kev <savage-garden@hanikamail.com>
Cc: linux-admin@vger.kernel.org, linux-config@vger.kernel.org
Subject: Re: SSH allow only form selected IP'
Date: Sat, 14 Aug 2004 21:42:58 +1000	[thread overview]
Message-ID: <411DFAC2.9050405@lovedthanlost.net> (raw)
In-Reply-To: <20040814171609.5498.SAVAGE-GARDEN@hanikamail.com>

[-- 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 --]

  reply	other threads:[~2004-08-14 11:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2004-08-14 11:54       ` Kev
2004-08-14 11:46     ` James Turnbull
  -- strict thread matches above, loose matches on Subject: below --
2004-08-14 11:52 Re[2]: " luke
2004-08-15 12:58 ` James Turnbull
2004-08-15 14:59   ` luke
2004-08-16 11:23     ` James Turnbull
2004-08-16 13:37       ` Re[2]: " Kev
2004-08-18 10:46         ` Stephen Samuel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=411DFAC2.9050405@lovedthanlost.net \
    --to=james@lovedthanlost.net \
    --cc=linux-admin@vger.kernel.org \
    --cc=linux-config@vger.kernel.org \
    --cc=savage-garden@hanikamail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.