Port forwarding openvpn server to client [closed]











up vote
0
down vote

favorite












I have a OpenVPN server that was deployed on Linode server. My computer's running the software that open port 8089 for client side connect. My computer do not have public ip, so the computer connect vpn to openvpn server for client connect with public ip address of vpn server.



How can i setup port forwarding for my computer? I mean how can the client side connect to my software with port 8089 that running on my computer via public ip of openvpn server?



enter image description here



My linode server: Debian 9
Use ufw for config firewall. I follow setup guide in this tut https://www.cyberciti.biz/faq/how-to-install-and-configure-an-openvpn-server-on-debian-9-in-5-minutes/



enter image description here










share|improve this question















closed as unclear what you're asking by G-Man, Stephen Harris, Thomas, peterh, JigglyNaga Dec 5 at 10:48


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.



















    up vote
    0
    down vote

    favorite












    I have a OpenVPN server that was deployed on Linode server. My computer's running the software that open port 8089 for client side connect. My computer do not have public ip, so the computer connect vpn to openvpn server for client connect with public ip address of vpn server.



    How can i setup port forwarding for my computer? I mean how can the client side connect to my software with port 8089 that running on my computer via public ip of openvpn server?



    enter image description here



    My linode server: Debian 9
    Use ufw for config firewall. I follow setup guide in this tut https://www.cyberciti.biz/faq/how-to-install-and-configure-an-openvpn-server-on-debian-9-in-5-minutes/



    enter image description here










    share|improve this question















    closed as unclear what you're asking by G-Man, Stephen Harris, Thomas, peterh, JigglyNaga Dec 5 at 10:48


    Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

















      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I have a OpenVPN server that was deployed on Linode server. My computer's running the software that open port 8089 for client side connect. My computer do not have public ip, so the computer connect vpn to openvpn server for client connect with public ip address of vpn server.



      How can i setup port forwarding for my computer? I mean how can the client side connect to my software with port 8089 that running on my computer via public ip of openvpn server?



      enter image description here



      My linode server: Debian 9
      Use ufw for config firewall. I follow setup guide in this tut https://www.cyberciti.biz/faq/how-to-install-and-configure-an-openvpn-server-on-debian-9-in-5-minutes/



      enter image description here










      share|improve this question















      I have a OpenVPN server that was deployed on Linode server. My computer's running the software that open port 8089 for client side connect. My computer do not have public ip, so the computer connect vpn to openvpn server for client connect with public ip address of vpn server.



      How can i setup port forwarding for my computer? I mean how can the client side connect to my software with port 8089 that running on my computer via public ip of openvpn server?



      enter image description here



      My linode server: Debian 9
      Use ufw for config firewall. I follow setup guide in this tut https://www.cyberciti.biz/faq/how-to-install-and-configure-an-openvpn-server-on-debian-9-in-5-minutes/



      enter image description here







      openvpn






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Dec 2 at 11:12

























      asked Dec 2 at 2:58









      Phan Sinh

      1012




      1012




      closed as unclear what you're asking by G-Man, Stephen Harris, Thomas, peterh, JigglyNaga Dec 5 at 10:48


      Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.






      closed as unclear what you're asking by G-Man, Stephen Harris, Thomas, peterh, JigglyNaga Dec 5 at 10:48


      Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
























          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote













          Before getting this working, first ensure that your VPN client has a fixed VPN IP address. The OpenVPN Howto describes how to complete this. Ensure you pick an IP pair for the client/server from the table in that doc.



          Now make sure that your Linode server can access your app on your client. I.e.



          telnet <Fixed VPN IP of your client machine> 8089


          To then connect the outside world, presuming your app is HTTP based, I would recommend a reverse proxy installed on the Linode machine.



          Install a reverse proxy on the Linode server, which will stand between connections from the outside world, and then forward onto your application. There are many available such as Nginx, Apache, HAProxy, TinyProxy. If you have simple requirements, TinyProxy is probably a good place to start. Once installed, ensure the following lines are in the config:



          ConnectPort 8089
          ReversePath "/" "http://<fixed IP of your VPN client>:8089"
          ReverseOnly yes
          ReverseMagic yes


          You will need to ensure that the firewall on your Linode server, accepts incoming connections from the outside world. To allow unrestricted access, using UFW:



          sudo ufw allow 8089/tcp


          Alternatively, if you only wish to allow specific clients to access your app:



          sudo ufw delete allow 8089/tcp


          and then for each client that should be able to access:



          sudo ufw allow from <external client IP> to 8089/tcp


          If you are also running a firewall on your VPN client machine, you will also need to ensure that there is a rule to allow the Linode server to connect to port 8089. You will need the VPN IP of your server. With fixed IP's, as per the Open VPN doc I referenced, you choose a pair of IP's for the VPN server and client to use:



          sudo ufw allow from <Linode VPN Server IP> to 8089/tcp


          You could also adjust the config so that your Linode server listens on an entirely different port (e.g. 80) by changing the 'Connect' parameter in the reverse proxy & updating the Linode server firewall rules to match, whilst your application remains on 8089.






          share|improve this answer























          • Thanks your comment @clockworknet. I have updated my question. My server use ufw to setup firewall. In your comment, I need to config each client(ip address) that want to connect to my software. That right?
            – Phan Sinh
            Dec 2 at 11:14










          • I have edited my answer to hopefully answer your clarification. Also, having thought about this again, I would suggest going with the reverse proxy method. It is arguably more secure, and easier to setup, assuming your app is HTTP based. I have edited my answer to remove the suggestion to use FW port forwarding.
            – clockworknet
            Dec 2 at 12:08










          • Thank so much @clockworknet. I will be research about proxy.
            – Phan Sinh
            Dec 3 at 13:48


















          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          1
          down vote













          Before getting this working, first ensure that your VPN client has a fixed VPN IP address. The OpenVPN Howto describes how to complete this. Ensure you pick an IP pair for the client/server from the table in that doc.



          Now make sure that your Linode server can access your app on your client. I.e.



          telnet <Fixed VPN IP of your client machine> 8089


          To then connect the outside world, presuming your app is HTTP based, I would recommend a reverse proxy installed on the Linode machine.



          Install a reverse proxy on the Linode server, which will stand between connections from the outside world, and then forward onto your application. There are many available such as Nginx, Apache, HAProxy, TinyProxy. If you have simple requirements, TinyProxy is probably a good place to start. Once installed, ensure the following lines are in the config:



          ConnectPort 8089
          ReversePath "/" "http://<fixed IP of your VPN client>:8089"
          ReverseOnly yes
          ReverseMagic yes


          You will need to ensure that the firewall on your Linode server, accepts incoming connections from the outside world. To allow unrestricted access, using UFW:



          sudo ufw allow 8089/tcp


          Alternatively, if you only wish to allow specific clients to access your app:



          sudo ufw delete allow 8089/tcp


          and then for each client that should be able to access:



          sudo ufw allow from <external client IP> to 8089/tcp


          If you are also running a firewall on your VPN client machine, you will also need to ensure that there is a rule to allow the Linode server to connect to port 8089. You will need the VPN IP of your server. With fixed IP's, as per the Open VPN doc I referenced, you choose a pair of IP's for the VPN server and client to use:



          sudo ufw allow from <Linode VPN Server IP> to 8089/tcp


          You could also adjust the config so that your Linode server listens on an entirely different port (e.g. 80) by changing the 'Connect' parameter in the reverse proxy & updating the Linode server firewall rules to match, whilst your application remains on 8089.






          share|improve this answer























          • Thanks your comment @clockworknet. I have updated my question. My server use ufw to setup firewall. In your comment, I need to config each client(ip address) that want to connect to my software. That right?
            – Phan Sinh
            Dec 2 at 11:14










          • I have edited my answer to hopefully answer your clarification. Also, having thought about this again, I would suggest going with the reverse proxy method. It is arguably more secure, and easier to setup, assuming your app is HTTP based. I have edited my answer to remove the suggestion to use FW port forwarding.
            – clockworknet
            Dec 2 at 12:08










          • Thank so much @clockworknet. I will be research about proxy.
            – Phan Sinh
            Dec 3 at 13:48















          up vote
          1
          down vote













          Before getting this working, first ensure that your VPN client has a fixed VPN IP address. The OpenVPN Howto describes how to complete this. Ensure you pick an IP pair for the client/server from the table in that doc.



          Now make sure that your Linode server can access your app on your client. I.e.



          telnet <Fixed VPN IP of your client machine> 8089


          To then connect the outside world, presuming your app is HTTP based, I would recommend a reverse proxy installed on the Linode machine.



          Install a reverse proxy on the Linode server, which will stand between connections from the outside world, and then forward onto your application. There are many available such as Nginx, Apache, HAProxy, TinyProxy. If you have simple requirements, TinyProxy is probably a good place to start. Once installed, ensure the following lines are in the config:



          ConnectPort 8089
          ReversePath "/" "http://<fixed IP of your VPN client>:8089"
          ReverseOnly yes
          ReverseMagic yes


          You will need to ensure that the firewall on your Linode server, accepts incoming connections from the outside world. To allow unrestricted access, using UFW:



          sudo ufw allow 8089/tcp


          Alternatively, if you only wish to allow specific clients to access your app:



          sudo ufw delete allow 8089/tcp


          and then for each client that should be able to access:



          sudo ufw allow from <external client IP> to 8089/tcp


          If you are also running a firewall on your VPN client machine, you will also need to ensure that there is a rule to allow the Linode server to connect to port 8089. You will need the VPN IP of your server. With fixed IP's, as per the Open VPN doc I referenced, you choose a pair of IP's for the VPN server and client to use:



          sudo ufw allow from <Linode VPN Server IP> to 8089/tcp


          You could also adjust the config so that your Linode server listens on an entirely different port (e.g. 80) by changing the 'Connect' parameter in the reverse proxy & updating the Linode server firewall rules to match, whilst your application remains on 8089.






          share|improve this answer























          • Thanks your comment @clockworknet. I have updated my question. My server use ufw to setup firewall. In your comment, I need to config each client(ip address) that want to connect to my software. That right?
            – Phan Sinh
            Dec 2 at 11:14










          • I have edited my answer to hopefully answer your clarification. Also, having thought about this again, I would suggest going with the reverse proxy method. It is arguably more secure, and easier to setup, assuming your app is HTTP based. I have edited my answer to remove the suggestion to use FW port forwarding.
            – clockworknet
            Dec 2 at 12:08










          • Thank so much @clockworknet. I will be research about proxy.
            – Phan Sinh
            Dec 3 at 13:48













          up vote
          1
          down vote










          up vote
          1
          down vote









          Before getting this working, first ensure that your VPN client has a fixed VPN IP address. The OpenVPN Howto describes how to complete this. Ensure you pick an IP pair for the client/server from the table in that doc.



          Now make sure that your Linode server can access your app on your client. I.e.



          telnet <Fixed VPN IP of your client machine> 8089


          To then connect the outside world, presuming your app is HTTP based, I would recommend a reverse proxy installed on the Linode machine.



          Install a reverse proxy on the Linode server, which will stand between connections from the outside world, and then forward onto your application. There are many available such as Nginx, Apache, HAProxy, TinyProxy. If you have simple requirements, TinyProxy is probably a good place to start. Once installed, ensure the following lines are in the config:



          ConnectPort 8089
          ReversePath "/" "http://<fixed IP of your VPN client>:8089"
          ReverseOnly yes
          ReverseMagic yes


          You will need to ensure that the firewall on your Linode server, accepts incoming connections from the outside world. To allow unrestricted access, using UFW:



          sudo ufw allow 8089/tcp


          Alternatively, if you only wish to allow specific clients to access your app:



          sudo ufw delete allow 8089/tcp


          and then for each client that should be able to access:



          sudo ufw allow from <external client IP> to 8089/tcp


          If you are also running a firewall on your VPN client machine, you will also need to ensure that there is a rule to allow the Linode server to connect to port 8089. You will need the VPN IP of your server. With fixed IP's, as per the Open VPN doc I referenced, you choose a pair of IP's for the VPN server and client to use:



          sudo ufw allow from <Linode VPN Server IP> to 8089/tcp


          You could also adjust the config so that your Linode server listens on an entirely different port (e.g. 80) by changing the 'Connect' parameter in the reverse proxy & updating the Linode server firewall rules to match, whilst your application remains on 8089.






          share|improve this answer














          Before getting this working, first ensure that your VPN client has a fixed VPN IP address. The OpenVPN Howto describes how to complete this. Ensure you pick an IP pair for the client/server from the table in that doc.



          Now make sure that your Linode server can access your app on your client. I.e.



          telnet <Fixed VPN IP of your client machine> 8089


          To then connect the outside world, presuming your app is HTTP based, I would recommend a reverse proxy installed on the Linode machine.



          Install a reverse proxy on the Linode server, which will stand between connections from the outside world, and then forward onto your application. There are many available such as Nginx, Apache, HAProxy, TinyProxy. If you have simple requirements, TinyProxy is probably a good place to start. Once installed, ensure the following lines are in the config:



          ConnectPort 8089
          ReversePath "/" "http://<fixed IP of your VPN client>:8089"
          ReverseOnly yes
          ReverseMagic yes


          You will need to ensure that the firewall on your Linode server, accepts incoming connections from the outside world. To allow unrestricted access, using UFW:



          sudo ufw allow 8089/tcp


          Alternatively, if you only wish to allow specific clients to access your app:



          sudo ufw delete allow 8089/tcp


          and then for each client that should be able to access:



          sudo ufw allow from <external client IP> to 8089/tcp


          If you are also running a firewall on your VPN client machine, you will also need to ensure that there is a rule to allow the Linode server to connect to port 8089. You will need the VPN IP of your server. With fixed IP's, as per the Open VPN doc I referenced, you choose a pair of IP's for the VPN server and client to use:



          sudo ufw allow from <Linode VPN Server IP> to 8089/tcp


          You could also adjust the config so that your Linode server listens on an entirely different port (e.g. 80) by changing the 'Connect' parameter in the reverse proxy & updating the Linode server firewall rules to match, whilst your application remains on 8089.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Dec 2 at 12:06

























          answered Dec 2 at 9:43









          clockworknet

          442




          442












          • Thanks your comment @clockworknet. I have updated my question. My server use ufw to setup firewall. In your comment, I need to config each client(ip address) that want to connect to my software. That right?
            – Phan Sinh
            Dec 2 at 11:14










          • I have edited my answer to hopefully answer your clarification. Also, having thought about this again, I would suggest going with the reverse proxy method. It is arguably more secure, and easier to setup, assuming your app is HTTP based. I have edited my answer to remove the suggestion to use FW port forwarding.
            – clockworknet
            Dec 2 at 12:08










          • Thank so much @clockworknet. I will be research about proxy.
            – Phan Sinh
            Dec 3 at 13:48


















          • Thanks your comment @clockworknet. I have updated my question. My server use ufw to setup firewall. In your comment, I need to config each client(ip address) that want to connect to my software. That right?
            – Phan Sinh
            Dec 2 at 11:14










          • I have edited my answer to hopefully answer your clarification. Also, having thought about this again, I would suggest going with the reverse proxy method. It is arguably more secure, and easier to setup, assuming your app is HTTP based. I have edited my answer to remove the suggestion to use FW port forwarding.
            – clockworknet
            Dec 2 at 12:08










          • Thank so much @clockworknet. I will be research about proxy.
            – Phan Sinh
            Dec 3 at 13:48
















          Thanks your comment @clockworknet. I have updated my question. My server use ufw to setup firewall. In your comment, I need to config each client(ip address) that want to connect to my software. That right?
          – Phan Sinh
          Dec 2 at 11:14




          Thanks your comment @clockworknet. I have updated my question. My server use ufw to setup firewall. In your comment, I need to config each client(ip address) that want to connect to my software. That right?
          – Phan Sinh
          Dec 2 at 11:14












          I have edited my answer to hopefully answer your clarification. Also, having thought about this again, I would suggest going with the reverse proxy method. It is arguably more secure, and easier to setup, assuming your app is HTTP based. I have edited my answer to remove the suggestion to use FW port forwarding.
          – clockworknet
          Dec 2 at 12:08




          I have edited my answer to hopefully answer your clarification. Also, having thought about this again, I would suggest going with the reverse proxy method. It is arguably more secure, and easier to setup, assuming your app is HTTP based. I have edited my answer to remove the suggestion to use FW port forwarding.
          – clockworknet
          Dec 2 at 12:08












          Thank so much @clockworknet. I will be research about proxy.
          – Phan Sinh
          Dec 3 at 13:48




          Thank so much @clockworknet. I will be research about proxy.
          – Phan Sinh
          Dec 3 at 13:48



          Popular posts from this blog

          Morgemoulin

          Scott Moir

          Souastre