Answer the question
In order to leave comments, you need to log in
Why does the Internet slow down through the Linux gateway?
The bottom line is this: there is a box with Linux (Debian 7), which terminates vlans, raises pppoe and launches these vlans on the Internet via pppoe. With the help of iptables, a firewall and NAT are configured, rising during boot with one script. ( pastebin.com/7ShyK22N)
Launched a home network (14 machines) through this gateway. After some time (5-7 days), the Internet began to slow down: then Chrome loads the page for a minute with a constant "Waiting ..." at the bottom, then the torrents fall off. With the help , I /sbin/sysctl net.netfilter.nf_conntrack_count
looked at how many active NAT translations, there were a lot of them. Decreased timeouts and increased table size, tried to stick to RFC5382:
echo 65536 > /sys/module/nf_conntrack/parameters/hashsize
echo 524288 > /proc/sys/net/netfilter/nf_conntrack_max
echo 120 > /proc/sys/net/netfilter/nf_conntrack_generic_timeout
echo 7440 > /proc/sys/net/netfilter/nf_conntrack_tcp_timeout_established
net.netfilter.nf_conntrack_count = 294
Answer the question
In order to leave comments, you need to log in
The PMTU Discovery blackhole was to blame. The provider somewhere blocked ICMP traffic, and my iptables rule for compressing mtu on the external interface did not work.
It turns out that TCP MSS rules can and should be written exclusively in the mangle table, which I just did not understand the first time due to the lack of documentation. After that everything worked:
iptables -t mangle -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --set-mss 1300
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question