Results 1 to 1 of 1
Thread: iptables update hostname in rule
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- Sep 2006
iptables update hostname in rule
The rule above will point to an IP address I want to SSH into my server, it is dynamic and can change.
It seems iptables won't update the actual address even if it has changed until it is restarted. I don't want a cron job that keeps restarting iptables for security reasons.
Anyone have any simple ideas to force iptables to update the hostname in a rule?
I ran across an interesting looking rule here but it doesn't work with my iptables:
iptables -A INPUT -p tcp --dport 22 -m recent --update --seconds 60 --hitcount 4 --rttl \
--name SSH -j LOG --log-prefix "SSH_brute_force "
I'm not expert but the "--update" switch looked helpful even though it doesn't seem to be a valid iptables rule
Any help will be appreciated