Re: IPTables rules and hosts that use DHCP
- From: Dances With Crows <danceswithcrows@xxxxxxx>
- Date: 27 Dec 2007 21:23:36 GMT
K. Jennings staggered into the Black Sun and said:
On Thu, 27 Dec 2007 14:03:59 -0600, Moe Trin wrote:
K. Jennings wrote:I have to allow a priori potential access from anywhere.
I have a set of IPTables rules to keep SSH attacks at bay.Do you really need to allow access to the entire world?
Essentially, the rules blacklist hosts that attempt to connect more
than three times within a 30 second time interval. I also have an
IPTables rule that exempts some hosts from such constraints - that
is, SSH connections from such hosts are accepted at any connection
rate.
Yes, but is there a reason you can't throttle everywhere? You mentioned
throttling and never went back to it; is this intentional?
The problem that I have is that A seems to be able to take up a wideone of those hosts uses DHCP, and its IP address changes with time. II'm assuming that "A" is some remote host you want to allow. There
really isn't a dynamic way out of things. What I've been doing is to
allow access to the pool of addresses that the allowed host may get
assigned.
variety of IP addresses. They don't seem to be constrained to a
specific network, as far as I can tell. Indeed, not even the first
components of the IP addresses used are always the same.
Port knocking? knockd , knock , a few rules like so:
[example]
sequence = 102:udp,333:tcp,525:udp,8000:tcp
seq_timeout = 10
tcpflags = syn
command = /sbin/iptables -I INPUT 1 -s %IP% -p tcp --dport 22 -j ACCEPT
....any IP provides the right sequence of knocks to the server running
knockd, that IP gets an obvious iptables rule change for it. Downside
is that you have to install knock or its 'Doze equivalent on the client
machines. (The last rule in INPUT is of course -p tcp --dport 22 -j
REJECT here.)
Do you HAVE to have your SSH server on port 22,The problem is that some people who would like to connect to my boxes
work with ISPs that do traffic management, and connections to
non-standard ports are severely limited, performance-wise,
How annoying. But interactive ssh sessions are generally OK on a thin
pipe. Are you scp'ing tons of crap, or tunneling other traffic?
--
"We all get our dreams stamped on from time to time, right? If it
didn't hurt, then what kind of second-rate dreams would they be?"
--Richard K. Morgan, _Woken Furies_
Matt G|There is no Darkness in Eternity/But only Light too dim for us to see
.
- Follow-Ups:
- Re: IPTables rules and hosts that use DHCP
- From: Moe Trin
- Re: IPTables rules and hosts that use DHCP
- From: K. Jennings
- Re: IPTables rules and hosts that use DHCP
- References:
- IPTables rules and hosts that use DHCP
- From: K. Jennings
- Re: IPTables rules and hosts that use DHCP
- From: Moe Trin
- Re: IPTables rules and hosts that use DHCP
- From: K. Jennings
- IPTables rules and hosts that use DHCP
- Prev by Date: Re: Stange : directories and files in / duplicated !!
- Next by Date: Re: IPTables rules and hosts that use DHCP
- Previous by thread: Re: IPTables rules and hosts that use DHCP
- Next by thread: Re: IPTables rules and hosts that use DHCP
- Index(es):
Relevant Pages
|