S
S
ShadowsFirel2014-06-15 21:20:38
System administration
ShadowsFirel, 2014-06-15 21:20:38

Traffic forwarding

There is a ping server up to which is about 350. It is possible to rent a vds in the same local network with a vps ping server - the server is less than 10 ping to wdski less than 50. How can I send all traffic along the path internet -> vps -> server? as simple as possible, because I am not strong in system administration.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
C
Cool Admin, 2014-06-16
@ShadowsFirel

On the VPS server in iptables we write something like this
iptables -t nat -A PREROUTING -p tcp -i $WAN -m multiport --dports $PORT -j DNAT --to $SERVER
, where WAN is the interface; PORT - port used by the application; SERVER - target server address.
Next, we try to connect via IP to the VPS, to the desired port, if the traffic has gone, then for convenience, you can already fix the DNS if it was.
If the traffic does not go - google on the topic iptables drop \ accept

A
Alexey Kalinin, 2014-06-15
@Kaliha

If there are sites, we change the A records of domains to the IP VPS, and on the VPS we set up FORWARD iptables on the server.

G
Gleb Bogdanov, 2014-06-16
@bogdanov_go

The option presented by ifaustrue is the best ..
However, you can do this

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question