-1

So recently I have setup my first VPN server with my Raspberry Pi 3 B+, using PiVPN, everything is fine until I have noticed that when I use Wifi, I can't connect to my VPN. But with 4G data, VPN is connected but the Internet is slow (Messenger) or I even can't use it (Chrome said that I'm offline ?) I am curious that is that whether the problem is from my VPN server or it come from something else?

The page I use to setup my Raspberry VPN Server: https://www.cloudpro.co.uk/it-infrastructure/virtualization/7503/how-to-turn-a-raspberry-pi-into-a-vpn-server

And one more thing, I live in Japan, my Raspberry Pi connect to Softbank router, dont know if it affect to this post.

Hope to here some advise, explaination form all of you.

Thankyou guys

Q.H.Chu
  • 1
  • 1
  • Please edit your question and add the output of these two commands when the VPN connection is established: ip addr and ip route. – Ingo Nov 19 '19 at 18:29

1 Answers1

0

So I haven't used PiVPN before, but I've tinkered with OpenVPN and installed it on a raspberry pi just fine. I've used this for a few years and it's come with me to my new locations (and new internet service providers). A lot of this will depend on getting a connection from the Internet to your Raspberry Pi. There are two potential problems I see with your setup, and I think the softbank router is the problem.

1. Your home network isn't accessible from the internet.

Internet Service Providers sometimes put you behind a firewall with other users. that means that they do some port forwarding when you use the web, but incoming connections are blocked. Essentially, the IP address you are trying to log into the VPN with is shared with other users.

Solution: Call up your ISP and ask to have a public facing IP address (or be removed from firewall). I've had to do this a couple times. Note that sometimes they will charge you extra if this means setting up a static IP.

2. Your router isn't configured properly (try this first)

When your router gets an incoming connection, it needs to know who to send the connection to. So you need to set up a rule on your router that says something like "any incoming connection on port 1234 send to 192.168.1.2 on port 5678." This is called port forwarding. And you need to make sure that your raspberry pi always has the same IP address. If you are on ethernet, this shouldn't change unless you disconnect, otherwise check out this link if you are on wifi

Solution: implement port fowarding. I just googled "how to port forwarding softbank router" and I got a reddit article saying the router can't do port forwarding :( Bummer dude. I have a netgear router, and the settings for port forwarding are in Advanced > Advanced Setup > Port forwarding.

I hope this helps. And I hope your router will let you do port forwarding!

Bryce S
  • 101
  • 1
  • Thank you for your reply. This is my Router Port Forwarding screen : https://m.imgur.com/gallery/e5eMwQy . I have changed Protocol to UDP, WAN and LAN change to 1194 - 1194, my IP address changed to my Ethernet Pi static address. – Q.H.Chu Nov 20 '19 at 13:37
  • @Q.H.Chu You don't like to give additional information I asked on a comment to the question? And please edit your question and add the information about your router to it. The link you have given in your comment is broken. – Ingo Nov 20 '19 at 18:57
  • But the OP wrote: "So recently I have setup my first VPN server with my Raspberry Pi 3 B+, using PiVPN, everything is fine ...". So port forwarding on the router works. – Ingo Nov 20 '19 at 19:10
  • Thank you for your considering.. The problem seem to solve since I change the protocol from UDP to TCP. But the connection still low on 4G data (the problem, I think maybe from my server network). One more thing that I still figure how to use my VPN server when connect Wifi (I currently test on my school proxy Wifi, wifi from convenience store ony), the log still stay WAIT for connecting. – Q.H.Chu Nov 24 '19 at 00:28