Ip forward with openvpn
-
hi is there anyway to forward to another ip after connecting to openvpn in centos 7?
-
@amirat
Can you be more clear, please? What will you forward, where, from where, to where? -
i mean i have 2 vps with diffrent ips at first using openvpn i connect to vps 1 , then with ip forwarding whole of my connection goes to my second vps , and i connect to another ip
-
It's all just routing. That a VPN is used is irrelevant.
-
@jknott so how can i do routing?
and i also need to use vpn for my phone , how you say that it is irrelevant?
i want to connect to first vps at first because in iran due to restrictions you cannot directly connect to a ip outside the country so the server has to be in iran well after i connected to iran server i use another vpn or vps to connect to another country server like germany or whatever in this way i connected through a vpn to 2 diffrent vps
anyways to do this? -
@amirat said in Ip forward with openvpn:
so how can i do routing?
and i also need to use vpn for my phone , how you say that it is irrelevant?Many people seem to think a VPN is somehow different from any other IP connection. All the VPN does is set up a secure connection between two points. Years ago, that might have been done with frame relay.
As for routing, you have to let the various devises know how to reach some other device. With a VPN, you at least have a route to the VPN server and from there out to the Internet. If you want to go anywhere else, then you have to ensure there's a route configured to that point. It also doesn't matter what the client is. Whether a computer or a phone, it still works the same way.
What you have to do is determine what you want to reach and where it is, relative to your OpenVPN server. Then you have to decide whether you have to add routes. For example, pfSense knows about directly connected networks, so you don't need to specify a route to them. Beyond that, you have to.