0

I used this tutorial to make my Raspberry 3 an access point. After following that, I can't connect to the internet—neither via Wi-Fi nor via cable.

With this tutorial when I see the DHCP status—it says failed—but when I make wlan0 up my Raspberry turns to an access point and give IP to my cell phone.

I need a VPN to connect to my internet and I don't have one on my Raspberry so I can't connect with cable.

I want to use my Raspberry as Picroft so I need Internet. so I need a way to switch between these modes. Can someone help me?

Update from the comments:

The RPi is an access point. To this access point I can connect to its wifi for example with my cell phone.

The RPi is connected with an ethernet cable to my pc windows 10 that get wifi internet from a modem. the modem is dhcp that give 192.168.1.114 ip to my pc. Before i connect pi to PC with cable it gives IP to my phone but the pi and phone both didn't have internet.

On the RPi is a VPN client running that should connect to a VPN server somewhere in the internet but i don't have internet on my RPi so i can't make a pi VPN.

My RPi IP before turning it into access point was 192.168.1.115. but in tutoral i use a static ip and the static ip of Rpi is 192.168.42.1 an gives ip to my phone and other devices in range of 192.168.42.10 to 50

  • Your question is a bit confusing for me. I guess You have a router that connected to the internet and it has ethernet ports. This LAN is complete working with DHCP server. Devices connected to this LAN will get an ip address and can go into the internet. The router does not span a wifi network. For this you will have your RasPi. Right? You will use a VPN to connect to the internet but VNPs are not used for that. It is used to connect to other private devices far away on the other side of the internet. Why do you think you have to switch between modes? VPN could be used with access point. – Ingo Aug 20 '18 at 16:50
  • my raspi became a router router that connected to the internet and it has one ethernet port. and the router it self is a DHCP server. it allocate ip to devices in the LAN and router it self can't connect to the WiFi. i want to switch between modes to have internet. the access point mod doesn't have internet.to use VPN with access point mode i nedd to run some command like install sth or update sth and it needs internet. can you help me ? – ali Aug 20 '18 at 17:02
  • i need internet in access point mode how can i have it? – ali Aug 20 '18 at 18:18
  • or i should switch between modes to have internet and i do'nt know this too – ali Aug 20 '18 at 18:19
  • I have started an answer and given a scheme for what I understand so far. Please correct me with comments under the answer. – Ingo Aug 20 '18 at 18:41
0

I guess this setup. The RPi is an access point. To this access point you can connect to its wifi for example with your cell phone. The RPi is connected with an ethernet cable to the internet router. The internet router has a DHCP server running and provides ip addresses to all connected devices, e.g. to the RPi and the phone. The internet router is connected to the internet and gives this to all connected devices. On the RPi is a VPN client running that connected to a VPN server somewhere in the internet.

                       D    10.10.10.2                    D        +----------+  10.10.10.1
                       H       /      vpn-tunnel          H        |          |      \
                       C      //=====================\\   C   //=====================> VPN-SERVER
                       P (tun0)                       \\  P  //    |          |
PHONE ~.~.~.~> (wlan0)RPI(eth0) ----------> PC ~.~.~.~> MODEM ---> | INTERNET |
     \  wifi                  \  ethernet  /  \  wifi         wan  |          |
   (dhcp)                     ip???    ip???  (dhcp)               +----------+

You want to use Picroft:

The Picroft project is an enclosure for a stock Raspberry Pi connected to a speaker and basic USB microphone. This is built around a Raspbian Jessie Lite installation. The entire project is available as a pre-built micro-SD image ready to be burned and placed into a Raspberry Pi.

As said it is a closed setup within an image. I'm afraid it is not easy to modify it without breaking its functionality. Also it use the obsolete Jessie version. I'm not familiar with Jessie.

I see three posibillities to solve your problem:

  1. Try to modify the Picroft installation either with scripts to switch between the network modes you need (that's what you prefer) or by setup an access point together with vpn. I think the latter is easier to set up because it is only one step forward to add a vpn to your access point installation.
  2. Make a dual boot installation with a boot manager for example with U-boot which is in the repositories. So you can switch by booting into Picroft without the need to modify it and you can boot into any other installation with the network setup you need.
  3. You invest into a second Raspberry Pi only for Picroft. That is for what Picroft is made.

If you ask me I would prefer point 3.

  • The RPi is an access point. To this access point you can connect to its wifi for example with your cell phone. this line is correct – ali Aug 21 '18 at 5:26
  • The RPi is connected with an ethernet cable to the internet router. the internet router you say is my pc windows 10 that get wifi internet from a modem. the modem is dhcp that give 192.168.1.114 ip to my pc. – ali Aug 21 '18 at 5:32
  • before i connect pi to PC with cable it gives IP to my phone but. the pi and phone both didn't have internet. – ali Aug 21 '18 at 5:35
  • On the RPi is a VPN client running that connected to a VPN server somewhere in the internet.for this line i want to do this but i don't have internet o my RPi so i cant make a pi VPN. – ali Aug 21 '18 at 5:37
  • my Rpi IP before turning it into access point was 192.168.1.115. but in tutoral i use a static ip and the static ip of Rpi is 192.168.42.1 an gives ip to my phone and other devices in range of 192.168.42.10 to 50 – ali Aug 21 '18 at 5:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.