Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Advertise on LowEndTalk.com
Looking for help setting up VPN with port forwarding on vps
New on LowEndTalk? Please read our 'Community Rules' by clicking on it in the right menu!

Looking for help setting up VPN with port forwarding on vps

Here is what i want to do :

I run a server at home, and want to route -ALL- Traffic to and from this machine though a VPN. So if i run a webserver on my home server, i should be able to open the website by using the vps ip.
Paying for help. Please message me.

Comments

  • r4h156r4h156 Member

    I recently set up a VPN on a VPS like this, used to route torrent traffic to a computer I have sitting at home without exposing my real IP. I used Nyr's OpenVPN script to configure and install OpenVPN and then set up an iptables rule for port forwarding.

    wget https://git.io/vpn -O openvpn-install.sh && bash openvpn-install.sh will take care of OpenVPN.

    The following iptables rule worked for me after a lot of trial and error. I only have one client connected to the VPN, so it is always assigned 10.8.0.2.
    iptables -t nat -A PREROUTING -p tcp --dport [port to forward] -j DNAT --to-destination 10.8.0.2:[same port]

    Hope that helps.

    Thanked by 1bdspice
  • If you are willing to pay. Might as well pay windscribe VPN. They have this kind of thing.

  • @yokowasis said:
    If you are willing to pay. Might as well pay windscribe VPN. They have this kind of thing.

    Looks like something i COULD use, but there is no servers near my own server, who adds alot of ping. My host is running a few gameservers aswell, so ping is key.

  • @r4h156 said:
    I recently set up a VPN on a VPS like this, used to route torrent traffic to a computer I have sitting at home without exposing my real IP. I used Nyr's OpenVPN script to configure and install OpenVPN and then set up an iptables rule for port forwarding.

    wget https://git.io/vpn -O openvpn-install.sh && bash openvpn-install.sh will take care of OpenVPN.

    The following iptables rule worked for me after a lot of trial and error. I only have one client connected to the VPN, so it is always assigned 10.8.0.2.
    iptables -t nat -A PREROUTING -p tcp --dport [port to forward] -j DNAT --to-destination 10.8.0.2:[same port]

    Hope that helps.

    Will take a look onto this

  • Still looking for someone who can set this up for me.

  • edited June 18

    Well, I run this kind of web services from a raspi on my home using tincd

    VPS = tinc server, nginx for domain request, internal IP 10.8.0.1
    Raspi = tinc client, internal IP 10.8.0.2

    So, when someone asking for raspibox.xyz, the DNS for example Cloudflare serve the request to the VPS, and the vps relay the request to the raspi using internal IP, such 10.8.0.2

    It works, no need port forward, but speed would be slow if vps and raspi on different country

    Nice tutorial : https://jordancrawford.kiwi/setting-up-tinc/

  • msallak1msallak1 Member

    What about Outline VPN? https://getoutline.org/en/home

Sign In or Register to comment.