License Public Domain
Lines 1
Keywords
connections (1) DD-WRT (1) router (1)
Permissions
Viewable by Everyone
Editable by All Siafoo Users

Allow More Connections in DD-WRT Router Firmware Atom Feed 1

In Brief In certain versions of the DD-WRT router firmware, using peer-to-peer will cripple the router. Why? By default, there's not enough simultaneous connections allowed. (I have no idea if current versions have this particular problem.) Luckily, though, you're running Linux on that router, so you can solve this problem (clever you).... more
# 's
1nvram set rc_startup="echo \"@reboot echo 4096 > /proc/sys/net/ipv4/ip_conntrack_max && echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts && echo 1 > /proc/sys/net/ipv4/icmp_ignore_bogus_error_responses && echo 512 > /proc/sys/net/ipv4/neigh/default/gc_thresh1 && echo 2048 > /proc/sys/net/ipv4/neigh/default/gc_thresh2 && echo 4096 > /proc/sys/net/ipv4/neigh/default/gc_thresh3 && echo \\\"600 1800 120 60 120 120 10 60 30 120\\\" > /proc/sys/net/ipv4/ip_conntrack_tcp_timeouts\" > /var/spool/cron/root"

In certain versions of the DD-WRT router firmware, using peer-to-peer will cripple the router. Why? By default, there's not enough simultaneous connections allowed. (I have no idea if current versions have this particular problem.) Luckily, though, you're running Linux on that router, so you can solve this problem (clever you).

To test:

# 's
1echo /proc/sys/net/ipv4/ip_conntrack_max

If this returns a suspiciously low number, like 32, you have a problem. You can set the number of connections higher with:

# 's
1echo 4096 > /proc/sys/net/ipv4/ip_conntrack_max

Modifying the router this way won't persist past a restart, however. There's a '@restart' parameter in /var/spool/cron/root, but that only gets called once! To solve this problem, you need to write to the nvram, telling it to write the @restart. That's kind of convoluted, I know, but it worked for me.

This script sets several internet configuration options. Make sure to run it on the router. There also might be a way to do it through the web interface, but I no longer remember ;)

Comments

over 8 years ago (28 Apr 2008 at 11:12 PM) by Michael Sutherland
I had this same problem with Tomato...