I am trying to set up a PPTP VPN on a Ubuntu 20.04 VPS hosted on Oracle Cloud and I want to set up my old Mi 3c router as the VPN client. I know PPTP is old and deprecated, as has been clearly mentioned in the DigitalOcean PPTP setup guide that I followed. I usually use a VPN that costs 5 Euros a month on my 5 devices but I don’t want to have it running all the time on my mobile devices, which is why I wanted to set up a VPN connection on the router.
I ran the following commands after setting up my Ubuntu 20.04 VPS and SSHing into it.
After this, I set up a new PPTP VPN connection on my Mi 3c router in VPN settings (it supports only PPTP). There I entered user123 as the username, password123 as the password and for the server address, I entered the IPv4 address of the VPS.
I also have added port 1723 (TCP) to allowed ports.
The old router that I have doesn’t support OpenVPN or Wireguard. There’s an OpenWRT firmware available for it but I’ve not been able to flash it with that yet. So with the stock firmware, I can only use PPTP.
As for why not use a commercial VPN’s app all the time, my main concern is battery. On my main PC (desktop), it’s not a problem but I don’t want to have a VPN running on my phone and tablet all day long.
I think you need an iptables FORWARD rule to allow traffic arriving on ppp0. Currently you allowed traffic arriving on eth0, which would be reply traffic from the internet. You need to allow the initial request outbound as well.
TBH, I’m not very familiar with this stuff (which is why I was following the DO guide). Can you tell me what I have to do to set up iptables FORWARD rule to allow traffic arriving on ppp0 and to allow the initial request outbound?
Overall your iptables rules aren’t fantastic, although will probably work if I’m reading them right. If that rule I just posted above works for you, I’ll send a more sensible/readable set of rules later on when I’m by my computer.
The VPS was running, yeah. But I kinda abandoned the project. Actually I came across a guide on running OpenWrt on my old router and spent the last 4 hours trying to figure out how to get it working and how to iron out issues I was having. I managed to run OpenWrt on it and that opened up Wireguard and OpenVPN as options for me. So I downloaded a config file from my VPN provider and set it up with the help of the guide they have. So instead of PPTP that I wanted to set up earlier, I now have set up Wireguard. Thanks once again for all the help.