0

We run several game servers all using one port with the use of IP Aliasing, the game servers bind to a specific aliased IP that belongs to the main dedicated server.

I've setup netplan already and it worked, however I wasn't able to setup IP-specific rules for iptables.

The game servers all use UDP port 19132.

I have tried making INPUT rules setting the destination to the aliased IPs one by one with their paired OUTPUT rules with the source IP as the aliased IPs.

iptables -A INPUT -d xx.xx.xx.xx -p udp --dport 19132 -j ACCEPT
iptables -A OUTPUT -s xx.xx.xx.xx -p udp --dport 19132 -j ACCEPT

Doing that didn't work and I was still unable to connect via the UDP port.

  • Maybe replace -A with -I? -A appends to the end of a table, -I inserts at the beginning. If you have a drop statement for the traffic prior to the rule, the rule will never be hit. – davidgo May 01 '20 at 20:32
  • If you change from input destination IP to output source IP, wouldn't it make sense to change destination port to source port likewise? – A.B May 01 '20 at 21:54

0 Answers0