H
H
HarpyWar2012-10-16 13:32:00
linux
HarpyWar, 2012-10-16 13:32:00

Redirect from example.com to example2.com:9999?

For some server (not the web) it is necessary that when accessing example.com, the connection is redirected to example2.com:xxxx. Further traffic goes through example2.com:xxxx
What is it called? Interested in the mechanism itself, how this can be done on your server.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
I
imalinov, 2012-10-16
@HarpyWar

There is no general solution.
If there is a need, then the protocol usually provides for a response meaning redirect (as it is in HTTP, SIP).
If the protocol does not support redirect, then it remains only on example.com to configure traffic forwarding to example2.com:9999, but in this case all traffic will still go through example.com.
If example.com and example2.com are on the same network, and traffic is expected from external sources, then traffic forwarding can be configured on the router.

I
iandriyanov, 2012-10-17
@iandriyanov

Try as tcp (if tcp) use nginx with module github.com/yaoweibin/nginx_tcp_proxy_module

N
nochkin, 2012-10-17
@nochkin

For the web, this is usually redirect or proxy, depending on the purpose.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question