[Kovarex] [14.9] Server stutters on player disconnect with NAT
Posted: Sat Sep 24, 2016 6:48 pm
When a player disconnects from a multiplayer session with a server behind NAT implemented with iptables, all players still in game will momentarily see the 'Server is not responding' progress bar. The exact time before the server starts responding again varies, can be less than a second or several seconds.
NAT rules in play:
As implied by the rules, dual server instances are running on ports 35000 and 35001.
NAT rules in play:
Code: Select all
iptables -t nat -A PREROUTING -p udp -d 104.255.169.247 --dport 34197 -j REDIRECT --to-port 35001
iptables -t nat -A POSTROUTING -p udp -s localhost --sport 35001 -j SNAT --to-source 104.255.169.247:34197
iptables -t nat -A POSTROUTING -p udp -s 104.255.169.246 --sport 35001 -j SNAT --to-source 104.255.169.247:34197
iptables -t nat -A PREROUTING -p udp -d 104.255.169.246 --dport 34197 -j REDIRECT --to-port 35000
iptables -t nat -A POSTROUTING -p udp -s localhost --sport 35000 -j SNAT --to-source 104.255.169.246:34197
iptables -t nat -A POSTROUTING -p udp -s 104.255.169.246 --sport 35000 -j SNAT --to-source 104.255.169.246:34197