Google Answers Logo
View Question
 
Q: iptables configuration in Linux ( No Answer,   3 Comments )
Question  
Subject: iptables configuration in Linux
Category: Computers > Security
Asked by: davert2-ga
List Price: $11.50
Posted: 05 Apr 2005 07:11 PDT
Expires: 05 May 2005 07:11 PDT
Question ID: 505188
I am running Red Hat Linux version 9 and am seeking a way to block
access to port 22 for anyone outside of North America (since I'm the
only person who should be able to reach port 22, and I travel, but not
outside the country). I would like help with setting up iptables to do
this, if it is indeed possible. If that is not possible, I'd like a
script to set up iptables to block access to port 22 from anywhere
other than a verizon.net IP address (unfortunately these change DAILY
and even the first three numbers can change!).

Clarification of Question by davert2-ga on 05 Apr 2005 10:33 PDT
(Oops, added this as a comment earlier. Meant to do a clarification.
Sorry for the duplicate.)

Along with everyone else, I get a huge number of dictionary attacks. I
guess I'd settle for knowing the rules to block/allow given top-level
domains, e.g. 68.12.x.x ... especially if ranges can be
blocked/entered. Would prefer Webmin instructions by the way.

Clarification of Question by davert2-ga on 06 Apr 2005 06:20 PDT
If you can tell me how to use the keys method, that would work nicely
- I'm using two machines, an OS X box (using iTerm for access rather
than the much less nifty Terminal), and an OS 9 box (using MacSSH for
access). I'd definitely consider that "answering the question." Thanks
for the alternative. I did think about keys earlier but again couldn't
find an easy guide.

Clarification of Question by davert2-ga on 06 Apr 2005 06:48 PDT
I did find the answer to the question from Rusty's Surprisingly Unreliable Guides. 

Accepting "If protocol is TCP and source is 141.0.0.0/8 and
destination port is 22" will get me everything starting with 141.
that's the rule I needed.

I appreciate your suggestions.

Clarification of Question by davert2-ga on 06 Apr 2005 06:50 PDT
...bozo, you can either provide info on the keys method at this point,
or if you did find the OS X / OS 9 answer, put it in...
Answer  
There is no answer at this time.

Comments  
Subject: Re: iptables configuration in Linux
From: dmrmv-ga on 05 Apr 2005 10:24 PDT
 
Presumably you're doing this to block SSH access, but shouldn't this
be secure already? I don't think there's any way to block everything
except verizon.net if you don't know what the IP ranges are ahead of
time. Iptables would have to essentially do an nslookup for every
address and I don't see any way to automate that.
Subject: Re: iptables configuration in Linux
From: davert2-ga on 05 Apr 2005 10:32 PDT
 
Along with everyone else, I get a huge number of dictionary attacks. I
guess I'd settle for knowing the rules to block/allow given top-level
domains, e.g. 68.12.x.x ... especially if ranges can be
blocked/entered. Would prefer Webmin instructions by the way.
Subject: Re: iptables configuration in Linux
From: bozo99-ga on 05 Apr 2005 16:33 PDT
 
Disable password access in sshd_conf so that only access with keys is
allowed.  Then provided your client machine travels with you, has the
keys on it, and is not compromised you get what you want.   The
dictionary attacks that started last July are still running.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy