@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.