1

Since my host doesn't support GRE tunneling ( in fact it blocks all other tunneling ) , is it possible to create traffic tunneling between two host with iptables ?

Host A: DDoS protected. Public IP: 111.111.111.111

Host B: Game server. Public IP: 222.222.222.222

NOTE:

  1. All TCP and UDP traffic must flow from Host A > Host B
  2. Game server on HOST B must be registered with Host A - Public IP so outbound traffic from Host B will flow to HOST A with HOST A Public IP address.

I would want to register Host A's Public IP address on HOST B machine and traffic should flow from Host A to Host B only. Basically players will connect with HOST A's Public IP.

I have achieved this with GRE tunneling but since my host doesn't support it, I'm looking for an alternative here.

Is it possible to do with iptables or do I need something else ?

1

If your host doesn't support GRE tunneling, then just use vxlan, which runs over UDP. Or set up a point-to-point VPN using e.g. openvpn between the two hosts.

  • Any example with vxlan over UDP protocol ? – Jayesh Rana Jan 5 at 16:58
  • I provided a link in the answer that includes various examples. – larsks Jan 5 at 17:13
1

You are confusing technologies. You can't use iptables for tunnelling. Tunneling implies encapsulating a packet inside another - iptablea does not do this. What IPtables can do is manipulate and track the source and/or destination addresses of packets which may or may not do what you want - depending on protocol and exact gaming server requirements. You have not provided sufficient information of the gaming protocol for a robust answer with respect of using iptables to solve the problem.

Note that while your provider may block GRE packets, many VPNs don't use GRE. OpenVPN uses UDP by default, but can be configured to use TCP - even TCP on 443 (so itooks like https).

  • Hi, my server uses 27015 UDP port. – Jayesh Rana Jan 5 at 16:55

Not the answer you're looking for? Browse other questions tagged or ask your own question.