Iptables issue - table does not exist? [SOLVED]
$ iptables --list
iptables v1.3.8: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
I probably overlooked something easy, but still can't get it :S
14 Replies
I would also suggest knockd if u really wanna hide your sshd.
edit: I think the error is because u have yet to save the rules file. You create the rules file, but until u save it and restart daemon nothing will happen. What distro are u using?? In arch the command is
/etc/rc.d/iptables save
iptables -N SSHSCAN
iptables -A INPUT -p tcp --dport 22 -m state --state NEW -j SSHSCAN
iptables -A SSHSCAN -m recent --set --name SSH
iptables -A SSHSCAN -m recent --update --seconds 300 --hitcount 3 --name SSH -j DROP
See
You probably want to whitelist your own home IP first.
@treybrown:
I really don't want to lock myself out to test.
:?
Just use the console from your members login if you do. Don't underestimate the power of the console. I don't even run sshd.
@treybrown:
I am trying to create a few simple rules to cut down on the number of SSH bruteforce attempts and am having issues. After I create the rules I am attempting to use "iptables –list" to make sure they are there/correct, but am receiving the following.
$ iptables --list iptables v1.3.8: can't initialize iptables table `filter': Table does not exist (do you need to insmod?) Perhaps iptables or your kernel needs to be upgraded.
I probably overlooked something easy, but still can't get it :S
are you root?
@jacko:
You create the rules file, but until u save it and restart daemon nothing will happen.
Would it be more consistent to write:
U create the rules file, but until u save it…
than to mix "you" and "u"?
James
@mwalling:
are you root?
Thanks for all the help everyone.
@kangaby:
Don't underestimate the power of the console. I don't even run sshd.
I never thought of that. Just don't run sshd and use the website to login. If i wanted to use putty, i could login to turn sshd on.
Are the any perceived downsides to that? The only one i can think of is if i didn't have a browser available.
@chacham:
The only one i can think of is if i didn.t have a browser available.
I use Putty to connect directly to the lish console on the host of my Linode. (Members area has details on how to do this for your account)
Sometimes it will slowdown, when the host is doing lots of stuff I guess, but other than that, it works a treat.
I've only ever used the Ajax console once from work, where putty (ssh) is blocked by our firewall, and that worked as well.
I just installed fail2ban, to see how that works out. I may just use this idea instead.