From: "Dave Strydom [i*]Group" <dave@igroup.co.za>
To: <gentoo-security@lists.gentoo.org>
Subject: RE: [gentoo-security] [OT?] automatically firewalling off IPs
Date: Mon, 3 Oct 2005 12:58:56 +0200 [thread overview]
Message-ID: <200510031051.j93Ap4Ph012508@robin.gentoo.org> (raw)
In-Reply-To: <43404CB8.3@lunatic.net.nz>
I don't have these Problems...
There are two ways to do this:
1) enable "extensions" flag in the USE line in make.conf and I enable the
GEOIP patch for iptables, and also recompile the kernel with the geoip
patch, then you can simply do this:
--------
iptables -A INPUT -p tcp -m geoip ! --src-cc US --dport 22 -j REJECT
--------
That way it will not allow any SSH connections to anyone outside your
country code.
2) Only Allow SSH connections from the IP's you use, for example we on a
static IP address at our office, so I allow connections my external servers
from that IP address, but when I am at home, I am on a dynamic IP. So I
allow access for the entire network that I'm connected to like:
$IPTABLES -A INPUT -p TCP -s 165.146.0.0/16 --dport 22 -j ACCEPT
$IPTABLES -A OUTPUT -p TCP -s 165.146.0.0/16 --dport 22 -j ACCEPT
The rest of the traffic I drop to port 22, I drop.
I find it a hell of a lot easier to allow only want I want to the server and
drop everything else, than to try and block every individual that tries to
connect to my ssh.
-----Original Message-----
From: Jeremy Brake [mailto:gentoolists@lunatic.net.nz]
Sent: 02 October 2005 11:10 PM
To: gentoo-security@lists.gentoo.org
Subject: [gentoo-security] [OT?] automatically firewalling off IPs
Hey all,
I'm looking for an app/script which can monitor for failed ssh logins, and
block using IPTables for $time after $number of failed logins (an exclusion
list would be handy as well) so that I can put a quick stop to these niggly
brute-force ssh "attacks" I seem to be getting more and more often.
Anyone have any ideas?
Thanks, Jeremy B
--
gentoo-security@gentoo.org mailing list
--
gentoo-security@gentoo.org mailing list
next prev parent reply other threads:[~2011-10-31 3:55 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-02 21:10 [gentoo-security] [OT?] automatically firewalling off IPs Jeremy Brake
2005-10-02 21:19 ` MaxieZ
2005-10-02 22:29 ` J Holder
2005-10-03 2:52 ` Brian Micek
2005-10-03 13:01 ` David vasil
2005-10-03 13:18 ` rpfc
2005-10-03 17:06 ` Kirk Hoganson
2005-10-04 16:25 ` boger
2005-10-04 17:16 ` Kirk Hoganson
2005-10-04 18:42 ` boger
2005-10-04 20:30 ` Kirk Hoganson
2005-10-04 20:42 ` boger
2005-10-04 19:45 ` [gentoo-security] Port knocking Tobias Sager
2005-10-04 20:20 ` boger
2005-10-02 21:24 ` [gentoo-security] [OT?] automatically firewalling off IPs Tad Glines
2005-10-02 22:53 ` Alex Efros
2005-10-02 23:02 ` Marc Risse
2005-10-06 1:40 ` Tad Glines
2005-10-06 8:13 ` Matan Peled
2005-10-06 9:15 ` William Kenworthy
2005-10-06 10:19 ` Matan Peled
2005-10-06 12:44 ` William Kenworthy
2005-10-06 21:02 ` Kirk Hoganson
2005-10-06 21:05 ` Brian Micek
2005-10-07 2:37 ` Tad Glines
2005-10-07 18:47 ` Eric Paynter
2005-10-08 13:40 ` RADDS Support Team
2005-10-02 21:33 ` DeadManMoving
2005-10-02 21:37 ` Hemmann, Volker Armin
2005-10-02 21:56 ` Alec Joseph Warner
2005-10-02 22:13 ` xyon
2005-10-02 21:53 ` Hassan El-Masri
2005-10-02 21:57 ` Andreas Waschbuesch
2005-10-02 22:20 ` darren kirby
2005-10-03 7:53 ` Christophe Garault
2005-10-03 8:29 ` Jerry Eastmanhouser
2005-10-03 10:58 ` Dave Strydom [i*]Group [this message]
2005-10-03 12:25 ` Oscar Carlsson
2005-10-03 13:29 ` Dan Shookowsky
2005-10-03 23:26 ` Jeremy Brake
2005-10-04 6:15 ` Joerg Mertin
2005-10-04 8:55 ` Dave Strydom
2005-10-04 14:45 ` Kyle Lutze
2005-10-04 14:49 ` Dave Strydom
2005-10-04 17:42 ` Kyle Lutze
2005-10-04 17:52 ` Neil Cherry
2005-10-05 16:46 ` Robert Larson
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=200510031051.j93Ap4Ph012508@robin.gentoo.org \
--to=dave@igroup.co.za \
--cc=gentoo-security@lists.gentoo.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox