Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Ip forward with openvpn

    Scheduled Pinned Locked Moved OpenVPN
    6 Posts 3 Posters 886 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      amirat
      last edited by

      hi is there anyway to forward to another ip after connecting to openvpn in centos 7?

      V JKnottJ 2 Replies Last reply Reply Quote 0
      • V
        viragomann @amirat
        last edited by

        @amirat
        Can you be more clear, please? What will you forward, where, from where, to where?

        1 Reply Last reply Reply Quote 0
        • A
          amirat
          last edited by

          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

          1 Reply Last reply Reply Quote 0
          • JKnottJ
            JKnott @amirat
            last edited by

            @amirat

            It's all just routing. That a VPN is used is irrelevant.

            PfSense running on Qotom mini PC
            i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
            UniFi AC-Lite access point

            I haven't lost my mind. It's around here...somewhere...

            A 1 Reply Last reply Reply Quote 0
            • A
              amirat @JKnott
              last edited by

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

              JKnottJ 1 Reply Last reply Reply Quote 0
              • JKnottJ
                JKnott @amirat
                last edited by

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

                PfSense running on Qotom mini PC
                i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
                UniFi AC-Lite access point

                I haven't lost my mind. It's around here...somewhere...

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post
                Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.