TIP: Click on subject to list as thread! ANSI
echo: linux_bbs
to: Benny Pedersen
from: Janis Kracht
date: 2016-02-19 13:25:56
subject: neat stuff....

Hi Benny,

>> sudo iptables -I INPUT -p tcp --dport 23 -i eth0 -m state --state NEW
>> -m recent --set

> imho invalid

That's the first step.  That step must be folllowed by #2 below.  How do
you think Shorewall works?  it sets the same type commands as these two
with Python scripts 

>> sudo iptables -I INPUT -p tcp --dport 23 -i eth0 -m state --state NEW
>> -m recent --update --seconds 30 --hitcount 2 -j DROP

>> All of a sudden idiots cannot connect here after 30 seconds 

> indeed, just remember i say i would like to help you with shorewall ?

Not needed, and not wanted here.  I can control it all by setting the
dport, and seconds after their initial connect.

Most people don't understand Iptables.  It's not hard to work with when you
understand it.

Here is what I'm using now, works great: Step 1:
sudo iptables -I INPUT -p tcp --dport 23 -i eth0 -m state --state NEW -m recent --set

Step 2:
sudo iptables -I INPUT -p tcp --dport 23 -i eth0 -m state --state NEW -m
recent --update --seconds 60 --hitcount 4 -j DROP

I use the same commands for port 8080 btw.

These commands will flush your iptables filewall, and remove all currently
active rules when you want to change the settings.

iptables -F
iptables -X

Take care,
Janis

--- BBBS/Li6 v4.10 Dada-2
* Origin: Prism bbs (1:261/38)
SEEN-BY: 11/201 14/5 19/33 34/999 90/1 116/18 120/331 123/500 128/187 140/1
SEEN-BY: 218/700 222/2 230/150 240/1120 249/303 250/1 261/38 100 266/404
SEEN-BY: 267/155 280/464 1027 282/1031 1056 292/907 908 320/119 219 340/400
SEEN-BY: 393/68 396/45 633/267 280 712/848 770/1 801/161 2320/105
@PATH: 261/38 712/848 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.