Recently, during a discussion of vpsok and other things, they asked me to write about how to quickly make vpn-tor-vpn or vpn-vpn. Read, comment)
Installing OVPN:
Download the script
curl -O Run it
chmod +x openvpn-install.sh
./openvpn-install .sh
Next, we follow it, everything is clear and understandable there
Recommendations: in AES-256 encryption, password per user, MANDATORY tcp connection!
The config for connecting to the server will be in the current directory with the name <username>.ovpn
Tor installation:
apt-get install tor (run as a default service, port 9050)
We make a client:
Download any config to a free OVPN server, add a line to it ( IF WE WANT VPN-VPN - do not add it! ):
socks-proxy 127.0.0.1 9050
Upload to vps to the /etc/openvpn/client folder with the name client.conf
Set up routing to save access via white ip:
ip rule add from <ip vps> table 15
ip route add default via <ip vps> table 15
Start the client:
service openvpn-client@client start
Check the client status (You should see the line Initialization sequense complete ):
service openvpn-client@client status
If the server status is dead, It's OK. The main thing is that the port specified for the server hangs in the netstat
output Clean up iptables and redirect traffic to the client from the server
iptables -F
iptables -I FORWARD -i tun1 -o eth0 -j ACCEPT
iptables -I FORWARD -i eth0 -o tun1 -j ACCEPT
iptables -t nat -A POSTROUTING -o tun1 -j MASQUERADE
Download the client config of our server (it will be in the directory where the installation script was launched from), connect and check through tracer (for Windows), traceroute (for Linux) We should
see ip first our vpn server, then the ip of the free vpn server
At the same time, the delay to the free vpn server should be much longer than to ours (due to the use of tor)
DONE!)
Installing OVPN:
Download the script
curl -O Run it
chmod +x openvpn-install.sh
./openvpn-install .sh
Next, we follow it, everything is clear and understandable there
Recommendations: in AES-256 encryption, password per user, MANDATORY tcp connection!
The config for connecting to the server will be in the current directory with the name <username>.ovpn
Tor installation:
apt-get install tor (run as a default service, port 9050)
We make a client:
Download any config to a free OVPN server, add a line to it ( IF WE WANT VPN-VPN - do not add it! ):
socks-proxy 127.0.0.1 9050
Upload to vps to the /etc/openvpn/client folder with the name client.conf
Set up routing to save access via white ip:
ip rule add from <ip vps> table 15
ip route add default via <ip vps> table 15
Start the client:
service openvpn-client@client start
Check the client status (You should see the line Initialization sequense complete ):
service openvpn-client@client status
If the server status is dead, It's OK. The main thing is that the port specified for the server hangs in the netstat
output Clean up iptables and redirect traffic to the client from the server
iptables -F
iptables -I FORWARD -i tun1 -o eth0 -j ACCEPT
iptables -I FORWARD -i eth0 -o tun1 -j ACCEPT
iptables -t nat -A POSTROUTING -o tun1 -j MASQUERADE
Download the client config of our server (it will be in the directory where the installation script was launched from), connect and check through tracer (for Windows), traceroute (for Linux) We should
see ip first our vpn server, then the ip of the free vpn server
At the same time, the delay to the free vpn server should be much longer than to ours (due to the use of tor)
DONE!)