OpenWrt Forum Archive

Topic: NAT table size?

The content of this topic has been archived on 31 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

What NAT table sizes does OpenWrt support?
I'm currentyl using DD-WRT (development seems dead) which appears to be limited to 4K which isn't enough.

Any.

Maybe the default value should be related to the RAM size as is default in linux.

Nice! Is it possible to set a per-IP limit on the number of NAT entries?

How much memory do the NAT entries take?

Somebody?

Why do you need so much entries in NAT table?

We're running out of the 4906 entries DD-WRT provides. AFAIK there's no way to increase the value and DD-WRT development seems kinda dead.

Still do not know why you put so many entries into NAT. 
Have you tried to reduce your entries by subnet mask?

No, what exactly would that do and how would I do it?

(Last edited by XTF on 5 Feb 2013, 13:01)

E.g. 
Suppose you have a  rule that applies to
192.168.0.1
192.168.0.2
192.168.0.3
with three entries respectively.
you could simply make that rule apply to
192.168.0.0/30
with a single  entry .

(Last edited by test0x01 on 5 Feb 2013, 17:02)

I've no idea what you're talking about. We've only got a single subnet anyway.

The point is each machine (or set of machines) can be limited to, e.g. 1000 connections so no individual user can max out the router for everyone else. DD-WRT is capable of per IP/mask limits but last I knew Openwrt was not.

Ah, where do I find these settings? I've only found "IP Filter Settings (adjust these for P2P)"  in Administration - Management, this is the table size.

Thanks. Is there no way to just increase the table capacity via the command line?

XTF wrote:

Thanks. Is there no way to just increase the table capacity via the command line?

Default value is here:

~# cat /proc/sys/net/nf_conntrack_max
16384

If you want to increase it to 65535, just write the new desired value:

~# echo 65535 > /proc/sys/net/nf_conntrack_max

The discussion might have continued from here.