Iptables --update recent module











up vote
0
down vote

favorite












This is what I have (in short):



--update --seconds 60 --hitcount 10 -j DROP


Does it mean that the rule will trigger if this hit count is 10 only? But what if the hit count is 9 or 11 will it not work will it? That's exactly what's going on in my case. The hit counts are 35, 40, 53, etc. and the rule does not work. Could anybody advise please, how do I make it work when this darn hit count is anything more than 10?



The entire thing looks like this:



iptables -A INPUT -p tcp --dport 80 -m state --state NEW -m recent --set
iptables -A INPUT -p tcp --dport 80 -m state --state NEW -m recent --update --seconds 60 --hitcount 10 -j DROP


P.S. Does this "--state NEW" mean a new connection form the same IP address or a new connection from another (new) IP address? It's confusing.










share|improve this question









New contributor




Dennis is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • This will only match if there are 10 (or more, explicitly stated in the manpage) hits within the last 60 seconds. Perhaps the counter you're seeing is including hits from more that 60 seconds ago?
    – wurtel
    Nov 20 at 12:04










  • Thank you for your comment. It's not the counter, it's live in my logs. The time is specified exactly in hours, minutes, and seconds (+ year, month, and day). It goes right through as if this rule does not exist at all...
    – Dennis
    Nov 20 at 12:11










  • Does it perhaps have anything to do with --limit-burst? Isn't it missing here is it?
    – Dennis
    Nov 20 at 12:30















up vote
0
down vote

favorite












This is what I have (in short):



--update --seconds 60 --hitcount 10 -j DROP


Does it mean that the rule will trigger if this hit count is 10 only? But what if the hit count is 9 or 11 will it not work will it? That's exactly what's going on in my case. The hit counts are 35, 40, 53, etc. and the rule does not work. Could anybody advise please, how do I make it work when this darn hit count is anything more than 10?



The entire thing looks like this:



iptables -A INPUT -p tcp --dport 80 -m state --state NEW -m recent --set
iptables -A INPUT -p tcp --dport 80 -m state --state NEW -m recent --update --seconds 60 --hitcount 10 -j DROP


P.S. Does this "--state NEW" mean a new connection form the same IP address or a new connection from another (new) IP address? It's confusing.










share|improve this question









New contributor




Dennis is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • This will only match if there are 10 (or more, explicitly stated in the manpage) hits within the last 60 seconds. Perhaps the counter you're seeing is including hits from more that 60 seconds ago?
    – wurtel
    Nov 20 at 12:04










  • Thank you for your comment. It's not the counter, it's live in my logs. The time is specified exactly in hours, minutes, and seconds (+ year, month, and day). It goes right through as if this rule does not exist at all...
    – Dennis
    Nov 20 at 12:11










  • Does it perhaps have anything to do with --limit-burst? Isn't it missing here is it?
    – Dennis
    Nov 20 at 12:30













up vote
0
down vote

favorite









up vote
0
down vote

favorite











This is what I have (in short):



--update --seconds 60 --hitcount 10 -j DROP


Does it mean that the rule will trigger if this hit count is 10 only? But what if the hit count is 9 or 11 will it not work will it? That's exactly what's going on in my case. The hit counts are 35, 40, 53, etc. and the rule does not work. Could anybody advise please, how do I make it work when this darn hit count is anything more than 10?



The entire thing looks like this:



iptables -A INPUT -p tcp --dport 80 -m state --state NEW -m recent --set
iptables -A INPUT -p tcp --dport 80 -m state --state NEW -m recent --update --seconds 60 --hitcount 10 -j DROP


P.S. Does this "--state NEW" mean a new connection form the same IP address or a new connection from another (new) IP address? It's confusing.










share|improve this question









New contributor




Dennis is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











This is what I have (in short):



--update --seconds 60 --hitcount 10 -j DROP


Does it mean that the rule will trigger if this hit count is 10 only? But what if the hit count is 9 or 11 will it not work will it? That's exactly what's going on in my case. The hit counts are 35, 40, 53, etc. and the rule does not work. Could anybody advise please, how do I make it work when this darn hit count is anything more than 10?



The entire thing looks like this:



iptables -A INPUT -p tcp --dport 80 -m state --state NEW -m recent --set
iptables -A INPUT -p tcp --dport 80 -m state --state NEW -m recent --update --seconds 60 --hitcount 10 -j DROP


P.S. Does this "--state NEW" mean a new connection form the same IP address or a new connection from another (new) IP address? It's confusing.







iptables






share|improve this question









New contributor




Dennis is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




Dennis is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited Nov 21 at 23:10









Rui F Ribeiro

38.2k1475125




38.2k1475125






New contributor




Dennis is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked Nov 20 at 11:50









Dennis

11




11




New contributor




Dennis is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Dennis is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Dennis is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












  • This will only match if there are 10 (or more, explicitly stated in the manpage) hits within the last 60 seconds. Perhaps the counter you're seeing is including hits from more that 60 seconds ago?
    – wurtel
    Nov 20 at 12:04










  • Thank you for your comment. It's not the counter, it's live in my logs. The time is specified exactly in hours, minutes, and seconds (+ year, month, and day). It goes right through as if this rule does not exist at all...
    – Dennis
    Nov 20 at 12:11










  • Does it perhaps have anything to do with --limit-burst? Isn't it missing here is it?
    – Dennis
    Nov 20 at 12:30


















  • This will only match if there are 10 (or more, explicitly stated in the manpage) hits within the last 60 seconds. Perhaps the counter you're seeing is including hits from more that 60 seconds ago?
    – wurtel
    Nov 20 at 12:04










  • Thank you for your comment. It's not the counter, it's live in my logs. The time is specified exactly in hours, minutes, and seconds (+ year, month, and day). It goes right through as if this rule does not exist at all...
    – Dennis
    Nov 20 at 12:11










  • Does it perhaps have anything to do with --limit-burst? Isn't it missing here is it?
    – Dennis
    Nov 20 at 12:30
















This will only match if there are 10 (or more, explicitly stated in the manpage) hits within the last 60 seconds. Perhaps the counter you're seeing is including hits from more that 60 seconds ago?
– wurtel
Nov 20 at 12:04




This will only match if there are 10 (or more, explicitly stated in the manpage) hits within the last 60 seconds. Perhaps the counter you're seeing is including hits from more that 60 seconds ago?
– wurtel
Nov 20 at 12:04












Thank you for your comment. It's not the counter, it's live in my logs. The time is specified exactly in hours, minutes, and seconds (+ year, month, and day). It goes right through as if this rule does not exist at all...
– Dennis
Nov 20 at 12:11




Thank you for your comment. It's not the counter, it's live in my logs. The time is specified exactly in hours, minutes, and seconds (+ year, month, and day). It goes right through as if this rule does not exist at all...
– Dennis
Nov 20 at 12:11












Does it perhaps have anything to do with --limit-burst? Isn't it missing here is it?
– Dennis
Nov 20 at 12:30




Does it perhaps have anything to do with --limit-burst? Isn't it missing here is it?
– Dennis
Nov 20 at 12:30















active

oldest

votes











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',
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
});


}
});






Dennis is a new contributor. Be nice, and check out our Code of Conduct.










 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f482953%2fiptables-update-recent-module%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes








Dennis is a new contributor. Be nice, and check out our Code of Conduct.










 

draft saved


draft discarded


















Dennis is a new contributor. Be nice, and check out our Code of Conduct.













Dennis is a new contributor. Be nice, and check out our Code of Conduct.












Dennis is a new contributor. Be nice, and check out our Code of Conduct.















 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f482953%2fiptables-update-recent-module%23new-answer', 'question_page');
}
);

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







Popular posts from this blog

Morgemoulin

Scott Moir

Souastre