iptables: No chain/target/match by that name - adding SSH ATTACK rule2019 Community Moderator ElectionUnable to make outbound SNMP connections when IPTables is enabledIptables: matching outgoing traffic with conntrack and owner. Works with strange dropsTPROXY for redirecting UDP on arbitrary portsiptables, what is truly open?Confusion about interfaces, iptables, connections, local connectionCONFIG_NF_CONNTRACK is not setHow to create/setup vpn using only SSH?iptables - 2 Internetprovider - routingConflict between wlan and ethernet boardHow to implement iptables on lxc-container?
Why Shazam when there is already Superman?
Why is this estimator biased?
putting logo on same line but after title, latex
Picking the different solutions to the time independent Schrodinger eqaution
Is there an injective, monotonically increasing, strictly concave function from the reals, to the reals?
What does chmod -u do?
How much character growth crosses the line into breaking the character
Why is the "ls" command showing permissions of files in a FAT32 partition?
Strong empirical falsification of quantum mechanics based on vacuum energy density
Why is it that I can sometimes guess the next note?
Does Doodling or Improvising on the Piano Have Any Benefits?
What is going on with 'gets(stdin)' on the site coderbyte?
Plot of a tornado-shaped surface
Do the primes contain an infinite almost arithmetic progression?
Can I visit Japan without a visa?
Creepy dinosaur pc game identification
Does the Linux kernel need a file system to run?
Can a Canadian Travel to the USA twice, less than 180 days each time?
Is aluminum electrical wire used on aircraft?
Biological Blimps: Propulsion
What is the highest possible scrabble score for placing a single tile
Why can Carol Danvers change her suit colours in the first place?
How to fade a semiplane defined by line?
It grows, but water kills it
iptables: No chain/target/match by that name - adding SSH ATTACK rule
2019 Community Moderator ElectionUnable to make outbound SNMP connections when IPTables is enabledIptables: matching outgoing traffic with conntrack and owner. Works with strange dropsTPROXY for redirecting UDP on arbitrary portsiptables, what is truly open?Confusion about interfaces, iptables, connections, local connectionCONFIG_NF_CONNTRACK is not setHow to create/setup vpn using only SSH?iptables - 2 Internetprovider - routingConflict between wlan and ethernet boardHow to implement iptables on lxc-container?
I have a problem with adding rule against brute-force SSH attacks. I try to do it in the following way:
iptables -F
iptables -L
iptables -N SSHATTACK
iptables -A SSHATTACK -j LOG --log-prefix "Possible SSH attack! " --log-level 7
iptables -A SSHATTACK -j DROP
#Block each IP address for 120 seconds which establishe more than three connections within 120 seconds. In case of the forth connection attempt, the request gets delegated to the SSHATTACK chain, which is responsible for logging the possible ssh attack and finally drops the request.
iptables -A INPUT -i venet0 -p tcp -m state --dport 22 --state NEW -m recent --set
iptables -A INPUT -i venet0 -p tcp -m state --dport 22 --state NEW -m recent --update --seconds 120 --hitcount 4 -j SSHATTACK
But I have a problem with these two lines:
iptables -A INPUT -i venet0 -p tcp -m state --dport 22 --state NEW -m recent --set
iptables -A INPUT -i venet0 -p tcp -m state --dport 22 --state NEW -m recent --update --seconds 120 --hitcount 4 -j SSHATTACK
Output after this command is
iptables: No chain/target/match by that name.
iptables -L
gives the following output:
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain SSHATTACK (0 references)
target prot opt source destination
LOG all -- anywhere anywhere LOG level debug prefix `Possible SSH attack! '
DROP all -- anywhere anywhere
and iptables -S
gives:
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT
-N SSHATTACK
-A SSHATTACK -j LOG --log-prefix "Possible SSH attack! " --log-level 7
-A SSHATTACK -j DROP
ip add
gives (I've hiden IP adress with '?'):
1 lo LOOPBACK,UP,LOWER_UP mtu 65536 qdisc noqueue state UNKNOWN
linkloopback 000000000000 brd 000000000000
inet 127.0.0.18 scope host lo
inet6 1128 scope host
valid_lft forever preferred_lft forever
2 venet0 BROADCAST,POINTOPOINT,NOARP,UP,LOWER_UP mtu 1500 qdisc noqueue state UNKNOWN
linkvoid
inet 127.0.0.132 scope host venet0
inet ?.?.?.24820 brd ?.?.?.255 scope global venet00
What can I do to add this rule? What am I missing?
ssh iptables ip internet
bumped to the homepage by Community♦ yesterday
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I have a problem with adding rule against brute-force SSH attacks. I try to do it in the following way:
iptables -F
iptables -L
iptables -N SSHATTACK
iptables -A SSHATTACK -j LOG --log-prefix "Possible SSH attack! " --log-level 7
iptables -A SSHATTACK -j DROP
#Block each IP address for 120 seconds which establishe more than three connections within 120 seconds. In case of the forth connection attempt, the request gets delegated to the SSHATTACK chain, which is responsible for logging the possible ssh attack and finally drops the request.
iptables -A INPUT -i venet0 -p tcp -m state --dport 22 --state NEW -m recent --set
iptables -A INPUT -i venet0 -p tcp -m state --dport 22 --state NEW -m recent --update --seconds 120 --hitcount 4 -j SSHATTACK
But I have a problem with these two lines:
iptables -A INPUT -i venet0 -p tcp -m state --dport 22 --state NEW -m recent --set
iptables -A INPUT -i venet0 -p tcp -m state --dport 22 --state NEW -m recent --update --seconds 120 --hitcount 4 -j SSHATTACK
Output after this command is
iptables: No chain/target/match by that name.
iptables -L
gives the following output:
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain SSHATTACK (0 references)
target prot opt source destination
LOG all -- anywhere anywhere LOG level debug prefix `Possible SSH attack! '
DROP all -- anywhere anywhere
and iptables -S
gives:
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT
-N SSHATTACK
-A SSHATTACK -j LOG --log-prefix "Possible SSH attack! " --log-level 7
-A SSHATTACK -j DROP
ip add
gives (I've hiden IP adress with '?'):
1 lo LOOPBACK,UP,LOWER_UP mtu 65536 qdisc noqueue state UNKNOWN
linkloopback 000000000000 brd 000000000000
inet 127.0.0.18 scope host lo
inet6 1128 scope host
valid_lft forever preferred_lft forever
2 venet0 BROADCAST,POINTOPOINT,NOARP,UP,LOWER_UP mtu 1500 qdisc noqueue state UNKNOWN
linkvoid
inet 127.0.0.132 scope host venet0
inet ?.?.?.24820 brd ?.?.?.255 scope global venet00
What can I do to add this rule? What am I missing?
ssh iptables ip internet
bumped to the homepage by Community♦ yesterday
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I have a problem with adding rule against brute-force SSH attacks. I try to do it in the following way:
iptables -F
iptables -L
iptables -N SSHATTACK
iptables -A SSHATTACK -j LOG --log-prefix "Possible SSH attack! " --log-level 7
iptables -A SSHATTACK -j DROP
#Block each IP address for 120 seconds which establishe more than three connections within 120 seconds. In case of the forth connection attempt, the request gets delegated to the SSHATTACK chain, which is responsible for logging the possible ssh attack and finally drops the request.
iptables -A INPUT -i venet0 -p tcp -m state --dport 22 --state NEW -m recent --set
iptables -A INPUT -i venet0 -p tcp -m state --dport 22 --state NEW -m recent --update --seconds 120 --hitcount 4 -j SSHATTACK
But I have a problem with these two lines:
iptables -A INPUT -i venet0 -p tcp -m state --dport 22 --state NEW -m recent --set
iptables -A INPUT -i venet0 -p tcp -m state --dport 22 --state NEW -m recent --update --seconds 120 --hitcount 4 -j SSHATTACK
Output after this command is
iptables: No chain/target/match by that name.
iptables -L
gives the following output:
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain SSHATTACK (0 references)
target prot opt source destination
LOG all -- anywhere anywhere LOG level debug prefix `Possible SSH attack! '
DROP all -- anywhere anywhere
and iptables -S
gives:
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT
-N SSHATTACK
-A SSHATTACK -j LOG --log-prefix "Possible SSH attack! " --log-level 7
-A SSHATTACK -j DROP
ip add
gives (I've hiden IP adress with '?'):
1 lo LOOPBACK,UP,LOWER_UP mtu 65536 qdisc noqueue state UNKNOWN
linkloopback 000000000000 brd 000000000000
inet 127.0.0.18 scope host lo
inet6 1128 scope host
valid_lft forever preferred_lft forever
2 venet0 BROADCAST,POINTOPOINT,NOARP,UP,LOWER_UP mtu 1500 qdisc noqueue state UNKNOWN
linkvoid
inet 127.0.0.132 scope host venet0
inet ?.?.?.24820 brd ?.?.?.255 scope global venet00
What can I do to add this rule? What am I missing?
ssh iptables ip internet
I have a problem with adding rule against brute-force SSH attacks. I try to do it in the following way:
iptables -F
iptables -L
iptables -N SSHATTACK
iptables -A SSHATTACK -j LOG --log-prefix "Possible SSH attack! " --log-level 7
iptables -A SSHATTACK -j DROP
#Block each IP address for 120 seconds which establishe more than three connections within 120 seconds. In case of the forth connection attempt, the request gets delegated to the SSHATTACK chain, which is responsible for logging the possible ssh attack and finally drops the request.
iptables -A INPUT -i venet0 -p tcp -m state --dport 22 --state NEW -m recent --set
iptables -A INPUT -i venet0 -p tcp -m state --dport 22 --state NEW -m recent --update --seconds 120 --hitcount 4 -j SSHATTACK
But I have a problem with these two lines:
iptables -A INPUT -i venet0 -p tcp -m state --dport 22 --state NEW -m recent --set
iptables -A INPUT -i venet0 -p tcp -m state --dport 22 --state NEW -m recent --update --seconds 120 --hitcount 4 -j SSHATTACK
Output after this command is
iptables: No chain/target/match by that name.
iptables -L
gives the following output:
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain SSHATTACK (0 references)
target prot opt source destination
LOG all -- anywhere anywhere LOG level debug prefix `Possible SSH attack! '
DROP all -- anywhere anywhere
and iptables -S
gives:
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT
-N SSHATTACK
-A SSHATTACK -j LOG --log-prefix "Possible SSH attack! " --log-level 7
-A SSHATTACK -j DROP
ip add
gives (I've hiden IP adress with '?'):
1 lo LOOPBACK,UP,LOWER_UP mtu 65536 qdisc noqueue state UNKNOWN
linkloopback 000000000000 brd 000000000000
inet 127.0.0.18 scope host lo
inet6 1128 scope host
valid_lft forever preferred_lft forever
2 venet0 BROADCAST,POINTOPOINT,NOARP,UP,LOWER_UP mtu 1500 qdisc noqueue state UNKNOWN
linkvoid
inet 127.0.0.132 scope host venet0
inet ?.?.?.24820 brd ?.?.?.255 scope global venet00
What can I do to add this rule? What am I missing?
ssh iptables ip internet
ssh iptables ip internet
edited Dec 7 '15 at 14:47
michalsol
asked Nov 30 '15 at 17:04
michalsolmichalsol
1113
1113
bumped to the homepage by Community♦ yesterday
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ yesterday
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
The --dport
parameter doesn't belong inside the state
match. Try:
iptables -A INPUT -i venet0 -p tcp --dport 22 -m state --state NEW -m recent --set
Unfortunately, it doesn't work either. I got the same error.
– michalsol
Nov 30 '15 at 22:41
Works for me. Can you add any entries to the INPUT table for that interface? Post interface info (ip add).
– Richard Doyle
Dec 1 '15 at 2:37
Sorry for the delay. I don't know how to check other entries, do you have any sample input? This is production server, so I don't want to brake anything :) My question is edited (I've add ip add output).
– michalsol
Dec 7 '15 at 14:45
add a comment |
What am I missing?
You could reduce your own ruleset's complexity and allow something like fail2ban
to manage it for you. Available in a CentOS 7 package repository near you, or downloadable via EPEL on CentOS 6.
Fail2ban has rules ready made for blocking ssh
attacks, and there are a couple of tutorials here or here.
I've just tried it but it doesn't seem to work. There is a new entry in iptables -L, but when I keep trying to log in with wrong passwords I don't get banned
– michalsol
Nov 30 '15 at 23:05
@michalsol you enabled thessh
rule infail2ban
's configuration as per the instructions, and restarted the daemon? You should see information in/var/log/fail2ban.log
– roaima
Dec 1 '15 at 12:52
Yes, I've done everything according to tutorial. In log file I just see that it has started but no info about blocking
– michalsol
Dec 7 '15 at 15:09
@michalsol you have thefail2ban
daemon running, and in/etc/fail2ban/jail.local
you have a section forssh
that includesenabled = true
?
– roaima
Dec 7 '15 at 15:15
Yes, enabled=true is set, and I've started fail2ban using 'sudo service fail2ban restart'
– michalsol
Dec 7 '15 at 15:38
|
show 6 more comments
This is an old thread, but if anyone gets here this might help (solved for me).
The issue is a missing kernel driver. After adding
CONFIG_NETFILTER_XT_MATCH_RECENT=y
to the kernel config and recompiling it, the problem was solved.
You can also add it as a module (=m) and insmod it at runtime
good luck!
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f246450%2fiptables-no-chain-target-match-by-that-name-adding-ssh-attack-rule%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
The --dport
parameter doesn't belong inside the state
match. Try:
iptables -A INPUT -i venet0 -p tcp --dport 22 -m state --state NEW -m recent --set
Unfortunately, it doesn't work either. I got the same error.
– michalsol
Nov 30 '15 at 22:41
Works for me. Can you add any entries to the INPUT table for that interface? Post interface info (ip add).
– Richard Doyle
Dec 1 '15 at 2:37
Sorry for the delay. I don't know how to check other entries, do you have any sample input? This is production server, so I don't want to brake anything :) My question is edited (I've add ip add output).
– michalsol
Dec 7 '15 at 14:45
add a comment |
The --dport
parameter doesn't belong inside the state
match. Try:
iptables -A INPUT -i venet0 -p tcp --dport 22 -m state --state NEW -m recent --set
Unfortunately, it doesn't work either. I got the same error.
– michalsol
Nov 30 '15 at 22:41
Works for me. Can you add any entries to the INPUT table for that interface? Post interface info (ip add).
– Richard Doyle
Dec 1 '15 at 2:37
Sorry for the delay. I don't know how to check other entries, do you have any sample input? This is production server, so I don't want to brake anything :) My question is edited (I've add ip add output).
– michalsol
Dec 7 '15 at 14:45
add a comment |
The --dport
parameter doesn't belong inside the state
match. Try:
iptables -A INPUT -i venet0 -p tcp --dport 22 -m state --state NEW -m recent --set
The --dport
parameter doesn't belong inside the state
match. Try:
iptables -A INPUT -i venet0 -p tcp --dport 22 -m state --state NEW -m recent --set
edited Nov 30 '15 at 21:43
roaima
45.8k758124
45.8k758124
answered Nov 30 '15 at 21:22
Richard DoyleRichard Doyle
1
1
Unfortunately, it doesn't work either. I got the same error.
– michalsol
Nov 30 '15 at 22:41
Works for me. Can you add any entries to the INPUT table for that interface? Post interface info (ip add).
– Richard Doyle
Dec 1 '15 at 2:37
Sorry for the delay. I don't know how to check other entries, do you have any sample input? This is production server, so I don't want to brake anything :) My question is edited (I've add ip add output).
– michalsol
Dec 7 '15 at 14:45
add a comment |
Unfortunately, it doesn't work either. I got the same error.
– michalsol
Nov 30 '15 at 22:41
Works for me. Can you add any entries to the INPUT table for that interface? Post interface info (ip add).
– Richard Doyle
Dec 1 '15 at 2:37
Sorry for the delay. I don't know how to check other entries, do you have any sample input? This is production server, so I don't want to brake anything :) My question is edited (I've add ip add output).
– michalsol
Dec 7 '15 at 14:45
Unfortunately, it doesn't work either. I got the same error.
– michalsol
Nov 30 '15 at 22:41
Unfortunately, it doesn't work either. I got the same error.
– michalsol
Nov 30 '15 at 22:41
Works for me. Can you add any entries to the INPUT table for that interface? Post interface info (ip add).
– Richard Doyle
Dec 1 '15 at 2:37
Works for me. Can you add any entries to the INPUT table for that interface? Post interface info (ip add).
– Richard Doyle
Dec 1 '15 at 2:37
Sorry for the delay. I don't know how to check other entries, do you have any sample input? This is production server, so I don't want to brake anything :) My question is edited (I've add ip add output).
– michalsol
Dec 7 '15 at 14:45
Sorry for the delay. I don't know how to check other entries, do you have any sample input? This is production server, so I don't want to brake anything :) My question is edited (I've add ip add output).
– michalsol
Dec 7 '15 at 14:45
add a comment |
What am I missing?
You could reduce your own ruleset's complexity and allow something like fail2ban
to manage it for you. Available in a CentOS 7 package repository near you, or downloadable via EPEL on CentOS 6.
Fail2ban has rules ready made for blocking ssh
attacks, and there are a couple of tutorials here or here.
I've just tried it but it doesn't seem to work. There is a new entry in iptables -L, but when I keep trying to log in with wrong passwords I don't get banned
– michalsol
Nov 30 '15 at 23:05
@michalsol you enabled thessh
rule infail2ban
's configuration as per the instructions, and restarted the daemon? You should see information in/var/log/fail2ban.log
– roaima
Dec 1 '15 at 12:52
Yes, I've done everything according to tutorial. In log file I just see that it has started but no info about blocking
– michalsol
Dec 7 '15 at 15:09
@michalsol you have thefail2ban
daemon running, and in/etc/fail2ban/jail.local
you have a section forssh
that includesenabled = true
?
– roaima
Dec 7 '15 at 15:15
Yes, enabled=true is set, and I've started fail2ban using 'sudo service fail2ban restart'
– michalsol
Dec 7 '15 at 15:38
|
show 6 more comments
What am I missing?
You could reduce your own ruleset's complexity and allow something like fail2ban
to manage it for you. Available in a CentOS 7 package repository near you, or downloadable via EPEL on CentOS 6.
Fail2ban has rules ready made for blocking ssh
attacks, and there are a couple of tutorials here or here.
I've just tried it but it doesn't seem to work. There is a new entry in iptables -L, but when I keep trying to log in with wrong passwords I don't get banned
– michalsol
Nov 30 '15 at 23:05
@michalsol you enabled thessh
rule infail2ban
's configuration as per the instructions, and restarted the daemon? You should see information in/var/log/fail2ban.log
– roaima
Dec 1 '15 at 12:52
Yes, I've done everything according to tutorial. In log file I just see that it has started but no info about blocking
– michalsol
Dec 7 '15 at 15:09
@michalsol you have thefail2ban
daemon running, and in/etc/fail2ban/jail.local
you have a section forssh
that includesenabled = true
?
– roaima
Dec 7 '15 at 15:15
Yes, enabled=true is set, and I've started fail2ban using 'sudo service fail2ban restart'
– michalsol
Dec 7 '15 at 15:38
|
show 6 more comments
What am I missing?
You could reduce your own ruleset's complexity and allow something like fail2ban
to manage it for you. Available in a CentOS 7 package repository near you, or downloadable via EPEL on CentOS 6.
Fail2ban has rules ready made for blocking ssh
attacks, and there are a couple of tutorials here or here.
What am I missing?
You could reduce your own ruleset's complexity and allow something like fail2ban
to manage it for you. Available in a CentOS 7 package repository near you, or downloadable via EPEL on CentOS 6.
Fail2ban has rules ready made for blocking ssh
attacks, and there are a couple of tutorials here or here.
answered Nov 30 '15 at 21:51
roaimaroaima
45.8k758124
45.8k758124
I've just tried it but it doesn't seem to work. There is a new entry in iptables -L, but when I keep trying to log in with wrong passwords I don't get banned
– michalsol
Nov 30 '15 at 23:05
@michalsol you enabled thessh
rule infail2ban
's configuration as per the instructions, and restarted the daemon? You should see information in/var/log/fail2ban.log
– roaima
Dec 1 '15 at 12:52
Yes, I've done everything according to tutorial. In log file I just see that it has started but no info about blocking
– michalsol
Dec 7 '15 at 15:09
@michalsol you have thefail2ban
daemon running, and in/etc/fail2ban/jail.local
you have a section forssh
that includesenabled = true
?
– roaima
Dec 7 '15 at 15:15
Yes, enabled=true is set, and I've started fail2ban using 'sudo service fail2ban restart'
– michalsol
Dec 7 '15 at 15:38
|
show 6 more comments
I've just tried it but it doesn't seem to work. There is a new entry in iptables -L, but when I keep trying to log in with wrong passwords I don't get banned
– michalsol
Nov 30 '15 at 23:05
@michalsol you enabled thessh
rule infail2ban
's configuration as per the instructions, and restarted the daemon? You should see information in/var/log/fail2ban.log
– roaima
Dec 1 '15 at 12:52
Yes, I've done everything according to tutorial. In log file I just see that it has started but no info about blocking
– michalsol
Dec 7 '15 at 15:09
@michalsol you have thefail2ban
daemon running, and in/etc/fail2ban/jail.local
you have a section forssh
that includesenabled = true
?
– roaima
Dec 7 '15 at 15:15
Yes, enabled=true is set, and I've started fail2ban using 'sudo service fail2ban restart'
– michalsol
Dec 7 '15 at 15:38
I've just tried it but it doesn't seem to work. There is a new entry in iptables -L, but when I keep trying to log in with wrong passwords I don't get banned
– michalsol
Nov 30 '15 at 23:05
I've just tried it but it doesn't seem to work. There is a new entry in iptables -L, but when I keep trying to log in with wrong passwords I don't get banned
– michalsol
Nov 30 '15 at 23:05
@michalsol you enabled the
ssh
rule in fail2ban
's configuration as per the instructions, and restarted the daemon? You should see information in /var/log/fail2ban.log
– roaima
Dec 1 '15 at 12:52
@michalsol you enabled the
ssh
rule in fail2ban
's configuration as per the instructions, and restarted the daemon? You should see information in /var/log/fail2ban.log
– roaima
Dec 1 '15 at 12:52
Yes, I've done everything according to tutorial. In log file I just see that it has started but no info about blocking
– michalsol
Dec 7 '15 at 15:09
Yes, I've done everything according to tutorial. In log file I just see that it has started but no info about blocking
– michalsol
Dec 7 '15 at 15:09
@michalsol you have the
fail2ban
daemon running, and in /etc/fail2ban/jail.local
you have a section for ssh
that includes enabled = true
?– roaima
Dec 7 '15 at 15:15
@michalsol you have the
fail2ban
daemon running, and in /etc/fail2ban/jail.local
you have a section for ssh
that includes enabled = true
?– roaima
Dec 7 '15 at 15:15
Yes, enabled=true is set, and I've started fail2ban using 'sudo service fail2ban restart'
– michalsol
Dec 7 '15 at 15:38
Yes, enabled=true is set, and I've started fail2ban using 'sudo service fail2ban restart'
– michalsol
Dec 7 '15 at 15:38
|
show 6 more comments
This is an old thread, but if anyone gets here this might help (solved for me).
The issue is a missing kernel driver. After adding
CONFIG_NETFILTER_XT_MATCH_RECENT=y
to the kernel config and recompiling it, the problem was solved.
You can also add it as a module (=m) and insmod it at runtime
good luck!
add a comment |
This is an old thread, but if anyone gets here this might help (solved for me).
The issue is a missing kernel driver. After adding
CONFIG_NETFILTER_XT_MATCH_RECENT=y
to the kernel config and recompiling it, the problem was solved.
You can also add it as a module (=m) and insmod it at runtime
good luck!
add a comment |
This is an old thread, but if anyone gets here this might help (solved for me).
The issue is a missing kernel driver. After adding
CONFIG_NETFILTER_XT_MATCH_RECENT=y
to the kernel config and recompiling it, the problem was solved.
You can also add it as a module (=m) and insmod it at runtime
good luck!
This is an old thread, but if anyone gets here this might help (solved for me).
The issue is a missing kernel driver. After adding
CONFIG_NETFILTER_XT_MATCH_RECENT=y
to the kernel config and recompiling it, the problem was solved.
You can also add it as a module (=m) and insmod it at runtime
good luck!
answered Nov 20 '17 at 7:07
sagivdsagivd
11
11
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f246450%2fiptables-no-chain-target-match-by-that-name-adding-ssh-attack-rule%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown