0

I set up a VPN server (OpenVPN) on my Raspberry Pi more than a year ago following these instructions: http://readwrite.com/2014/04/10/raspberry-pi-vpn-tutorial-server-secure-web-browsing/

It's always worked like a charm. The other day my SD crashed and I had to repeat the procedure. I don't know if I did something differently this time, because it still works, but not quite like a charm anymore.

If I set up a VPN connection on my phone over mobile data all is OK.

  • ipchicken.com shows me that my public IP address is my home's
  • I can also enter 192.168.1.xx in my mobile's browser and the web that runs on my Raspberry Pi shows

However, if I set up a VPN connection over WiFi in my friend's house (on that same phone or on his computer),

  • ipchicken.com shows me that my public IP address is my home's, so that's OK
  • but if I open that webpage on my Pi it is not found

Thinking about it, it makes sense to me. My friend WiFi also has internal IP addresses starting with 192.168... The address 192.168.1.xx that my Pi runs on in my house is not an address on his network. Being on his network, althought connected to the VPN, seems to be searching for the IP on his network, not mine.

How is it possible that I never had this problem before?
How can I make it work again.

It's not just that I what to be able to show that webpage. More importantly, I need to be able to connect over Remote Desktop to one of the Windows machines in my home.
p.s. I've set a port forwarding in my router redirecting UDP traffic on port 1194 to the Pi, as instructed.

6
  • You should pls post the networks of your home and of your friend's home. Then we'll know. Commented Nov 14, 2016 at 17:18
  • post the networks? What do you mean?
    – mgr326639
    Commented Nov 14, 2016 at 20:28
  • I mean the range of IP addresses served by the two routers. Commented Nov 14, 2016 at 22:03
  • I've set my router's DHCP server to give IP addresses in the range 192.168.1.100 to 192.168.1.254. I'm not sure about my friend's side. I guess it's 192.168.1.2 to 192.168.1.254.
    – mgr326639
    Commented Nov 19, 2016 at 15:38
  • That's your problem: the two nets must differ. You must absolutely change one (your own, I presume). Change it to something unusual, like 192.168.43.0/24, exactly to prevent this kind of problems. – Commented Nov 19, 2016 at 17:22

1 Answer 1

0

I've set my router's DHCP server to give IP addresses in the range 192.168.1.100 to 192.168.1.254. I'm not sure about my friend's side. I guess it's 192.168.1.2 to 192.168.1.254.

That's your problem: the two nets must differ. You must absolutely change one (your own, I presume). Change it to something unusual, like 192.168.43.0/24, exactly to prevent this kind of problems.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .