I want to redirect a port, so say all traffic coming in on subdomain.xyz.com:2233 is rerouted to an ip 10.13.15.34:3344 (for example) I have access to an ubuntu box if needed, and access to xyz.com's DNS records, but i cannot change the port on the ip. Any help would be appreciated, thanks!
-
forwarding ports isn't done from the web server or the DNS records you need access to the router or firewall. Make and model will help.– SupercerealApr 18, 2012 at 15:59
-
The gameserver isn't home hosted, its from a proffessional host. I need the IP and port changed to a subdomain and different port. I have access to the domain, and a linux box to route through, idk if it helps/is needed :)– Adam DodmanApr 18, 2012 at 18:39
-
Yes the linux box as a router is pretty important...– SupercerealApr 18, 2012 at 18:43
-
The linux box isn't hosting the server, I just need info on how to route the ip through the server to change the ports.– Adam DodmanApr 18, 2012 at 20:24
Add a comment
|
1 Answer
You need to point subdomain.xyz.com to a Linux box you control, and then configure it to DNAT the packets to the server. First add an A record for subdomain.xyz.com pointing to the Linux box. Then setup iptables with something like this:
iptables --table nat --append PREROUTING --protocol tcp --dport 2233 --jump DNAT --to-destination 10.13.15.34:3344
iptables --append FORWARD --protocol tcp --ports 3344 --jump ACCEPT
-
You should accept his answer so we know a good solution was found to your problem :) May 10, 2012 at 6:45