0

I have the following setup:

[USER] ---> [VPS server with public IP on eth0] ----> [some random VPN]

ifconfig: https://justpaste.it/73dhw

VPS server runs SOCKS proxy and I can connect to it and use it fine. I want to connect the server to VPN so all the traffic goes through VPN and not directly from the server. Problem is, the moment I run OPVN client and it establishes connection I lose access to my server via its public IP (to which SSHD and socks server are bound). Now, my knowledge of networking and routing is incredibly scarce, but I'm assuming this happens because OpenVPN rises its own virtual network interface and makes it a default one.

What I want is that when server receives request to its public IP 1.2.3.4 it would route it through the eth0 interface IP belongs to rather than through VPN, but all local/outcoming traffic - through VPN.

Kirikan
  • 13
  • 3
  • Do you want ALL traffic originated from the VPS server to also be sent through the VPN? Or just want comes from the user / socks server? – gtirloni Nov 21 '19 at 10:10
  • Huh, I actually didnt even think about possibility of the 2nd variant. But no, for now I want all traffic from the server to go through VPN (default vpn behavior), that includes my traffic I would like to be able to send via socks proxy that is on the said server as well. Updated with ifconfig – Kirikan Nov 21 '19 at 10:22
  • Wait, except SSH I guess? I still want to communicate through SSH directly rather then server sending me SSH data through random VPN. – Kirikan Nov 21 '19 at 10:37

0 Answers0