DD-WRT firewall rule configuration

3

I'm using DD-WRT on my linksys router.

I want to limit each user on my network to 200 connections at any given time. Does anyone know the rules I enter the firewall in DD-WRT admit panel.

I tried the following with no luck:

iptables -I FORWARD -s -d 192.168.1.0/24 -p tcp -m connlimit --connlimit-above 150 -j DROP

iptables -I FORWARD -s -d 192.168.1.0/24 -p udp -m connlimit --connlimit-above 50 -j DROP

ddobie

Posted 2010-09-24T03:28:19.013

Reputation:

1I think that ipt_connlimit.o in included in the commercial version of DD-WRT so these lines basicly don't do anything. – wqw – 2011-04-11T13:42:37.000

2Not an answer, but assuming the command works (ie the connlimit module is loaded), the commands you have issued would limit the entire class C to 150 simultaneous connections. You would probably want a separate line for each address (maybe script it with a for loop ???) Also I doubt you can "connection limit" UDP connections as UDP is stateless. Depending on what you are trying to do, maybe you can do something with QoS ? – davidgo – 2013-07-04T08:47:23.883

Answers

0

Try this out:

iptables -t mangle -A POSTROUTING -p tcp -s 192.168.1.0/24 -m connlimit --connlimit-above 200 -j DROP

Dmitri DB

Posted 2010-09-24T03:28:19.013

Reputation: 323

0

Use the DD-WRT Script generator http://www.icpnet.pl/~robsonn/generator.zip

just follow the instruction in the software, it will generate the firewall script that you can copy and paste into DD-WRT firewall script.

technomage

Posted 2010-09-24T03:28:19.013

Reputation: