deja20
Posts: 16
Joined: Fri Oct 28, 2016 5:20 pm

Trying to create VPN Wifi HotSpot Rasp Pi 3

Fri Oct 28, 2016 5:29 pm

Hey

I am very new to Linux,so I am googling idiot proof guides,Ive gotten close to completing it

I have created a normal wifi hotspot successfully following this guide
https://frillip.com/using-your-raspberr ... h-hostapd/

Now I am trying to add the VPN using this guide starting from point 5
https://makezine.com/projects/browse-an ... or-router/

The VPN is alive in my terminal but my devices will not load any webpages,I do not even get a time out,or an error,just stays loading
Ive also got an extra device called tun0 in my ifconfig,theres a mention to tun0 in the IPTables commands in point 5

Can anyone help point me in the right direction to route this traffic successfully

here is my ifconfig,I dont really know anything about networking but it looks a bit messed up

Image

thanks very much for any help

deja20
Posts: 16
Joined: Fri Oct 28, 2016 5:20 pm

Re: Trying to create VPN Wifi HotSpot Rasp Pi 3

Fri Oct 28, 2016 7:42 pm

got it working :)

will post a quick tutorial about the workarounds to get it going

NeonMonoxide
Posts: 1
Joined: Sun Nov 06, 2016 1:59 am

Re: Trying to create VPN Wifi HotSpot Rasp Pi 3

Sun Nov 06, 2016 2:01 am

Any update to this post? I am trying to do something similar.

raspalber
Posts: 4
Joined: Fri Nov 11, 2016 3:54 pm

Re: Trying to create VPN Wifi HotSpot Rasp Pi 3

Fri Nov 11, 2016 4:07 pm

I have the same problem, you may indicate to me the solution
thank you so much

deja20
Posts: 16
Joined: Fri Oct 28, 2016 5:20 pm

Re: Trying to create VPN Wifi HotSpot Rasp Pi 3

Wed Nov 23, 2016 5:03 pm

NeonMonoxide wrote:Any update to this post? I am trying to do something similar.
posting now

deja20
Posts: 16
Joined: Fri Oct 28, 2016 5:20 pm

Re: Trying to create VPN Wifi HotSpot Rasp Pi 3

Wed Nov 23, 2016 5:03 pm

raspalber wrote:I have the same problem, you may indicate to me the solution
thank you so much
posting now

deja20
Posts: 16
Joined: Fri Oct 28, 2016 5:20 pm

Re: Trying to create VPN Wifi HotSpot Rasp Pi 3

Wed Nov 23, 2016 5:09 pm

on the first link follow everything until you come to here,which is when you modify the IP table

"We also need to share our Pi's internet connection to our devices connected over WiFi by the configuring a NAT between our wlan0 interface and our eth0 interface. We can do this using the following commands:"

then go to the second link

Start at step 5,do this,then on step 6 when you get to modifying the IP tables stop ,like the last point
"Tell Linux to masquerade as your computer on the internet: $ sudo iptables –t nat –A POSTROUTING "

(I think this guys post doesnt work for modifying the IP tables,so go back to original post and go to where you stopped

replace eth0 with tun0 for all the below points in the tutorial

sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
sudo iptables -A FORWARD -i eth0 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT
sudo iptables -A FORWARD -i wlan0 -o eth0 -j ACCEPT

raspalber
Posts: 4
Joined: Fri Nov 11, 2016 3:54 pm

Re: Trying to create VPN Wifi HotSpot Rasp Pi 3

Wed Nov 23, 2016 8:15 pm

deja20 wrote:on the first link follow everything until you come to here,which is when you modify the IP table

"We also need to share our Pi's internet connection to our devices connected over WiFi by the configuring a NAT between our wlan0 interface and our eth0 interface. We can do this using the following commands:"

then go to the second link

Start at step 5,do this,then on step 6 when you get to modifying the IP tables stop ,like the last point
"Tell Linux to masquerade as your computer on the internet: $ sudo iptables –t nat –A POSTROUTING "

(I think this guys post doesnt work for modifying the IP tables,so go back to original post and go to where you stopped

replace eth0 with tun0 for all the below points in the tutorial

sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
sudo iptables -A FORWARD -i eth0 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT
sudo iptables -A FORWARD -i wlan0 -o eth0 -j ACCEPT
thanks so much work

Last question :if I want to share even vpn with ethernet, how you do?

deja20
Posts: 16
Joined: Fri Oct 28, 2016 5:20 pm

Re: Trying to create VPN Wifi HotSpot Rasp Pi 3

Wed Nov 23, 2016 9:37 pm

raspalber wrote:
deja20 wrote:on the first link follow everything until you come to here,which is when you modify the IP table

"We also need to share our Pi's internet connection to our devices connected over WiFi by the configuring a NAT between our wlan0 interface and our eth0 interface. We can do this using the following commands:"

then go to the second link

Start at step 5,do this,then on step 6 when you get to modifying the IP tables stop ,like the last point
"Tell Linux to masquerade as your computer on the internet: $ sudo iptables –t nat –A POSTROUTING "

(I think this guys post doesnt work for modifying the IP tables,so go back to original post and go to where you stopped

replace eth0 with tun0 for all the below points in the tutorial

sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
sudo iptables -A FORWARD -i eth0 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT
sudo iptables -A FORWARD -i wlan0 -o eth0 -j ACCEPT
thanks so much work

Last question :if I want to share even vpn with ethernet, how you do?

No idea sorry,I dont know anything about Linux,but I would guess it is the above on the iptables,that routes the traffic,maybe google on a project that does that and modify it accordingly

Return to “Networking and servers”