M
M
Multigame2016-05-20 10:47:39
Domain Name System
Multigame, 2016-05-20 10:47:39

How to forward from one "domain" port to another server?

Good afternoon. The final question was a little clumsily formulated, I will describe the situation.
There is software that connects to the server via domain + port 8888. In the same software, there is an update system that refers to the same domain but port 80. It is not possible to change the software.
The server is in a network, access to which is closed on port 80 (8888 is open and working). It's also impossible to change it.
Question. How can you make "domain:80" refer to one server and "domain:8888" to another with minimal effort?
So far, I see only a solution on the DNS server to set up an A-record on a new server with completely open ports, on which, through iptables, filter requests to one and the other port and redirect to different ip (for 80 some hosting thread, for 8888 an existing server) .
But such a solution will require about 2-3k rubles per server, since most vds do not have the iptables modules needed for such addressing.
What do you advise? maybe there is another way?

Answer the question

In order to leave comments, you need to log in

6 answer(s)
V
Vladimir Dubrovin, 2016-05-20
@z3apa3a

in 3proxy
tcppm 80 host1 80
tcppm 8888 host2 8888

S
spotifi, 2016-05-20
@spotifi

nginx proxy if it works via http.

E
Error 502, 2016-05-20
@NullByte

Ie on your main server, too, no iptables? What axle is worth? Installing from the repositories is also not possible?

A
Aleksandr, 2016-05-20
@cyberspy

Dig towards reverse-proxy...

Y
Yuri Chudnovsky, 2016-05-20
@Frankenstine

Nu, something like this:

iptables -I INPUT -p tcp --dport 8888 -j ACCEPT
iptables -A PREROUTING -t nat -p tcp --dport 80 -j REDIRECT --to-port 8888

Although you said that "changing this is also impossible"...
Maybe you can forward packets on the source and not the destination?..

R
rino906, 2016-05-20
@rino906

If the server is behind a router that does not allow packets to the server on port tcp:80, then the option you assume is the only correct one. Solved on any vds from 190 rubles with unlimited traffic + haproxy

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question