H
H
hamburger222015-05-22 11:27:13
linux
hamburger22, 2015-05-22 11:27:13

How to set up tunnel or add proxy in linux?

There are two servers: 111.111.111.111 and 222.222.222.222 respectively. I need to add ip1 to server 2. So that I can access the Internet via ip1 from server 2. I know at least two ways how to do this:
1. Raise a proxy server on server 1 (3proxy or squid)
2. Create a tunnel between them. And on server 2 in the network settings, add this IP through the tunnel and I will get a server with 2 IPs instead of one.
Problem: on server 1 I can set up a proxy server, how can I add it as an additional ip to server 2?
Or how to raise a tunnel between them? I’m sitting dumb ... I searched a lot of information on the Internet, but there is almost only water, or I searched very badly ...
Please tell me how to do it. Thanks

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2015-05-23
@Weidmann

Server 1:
openvpn
iptables -t nat -A POSTROUTING --source $OPENVPN_CLIENT_NETWORK/MASK -j SNAT --to-source $WAN_IP
Server 2:
openvpn
ip, gateways, etc. should rise by themselves if you set it up)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question