0

I'm doing a VPN router with Access Point capability, but the router doesn't broadcast network SSID and the network doesn't work at all now. I've realised that when I type service openvpn stop, then I have internet back, so the VPN isn't configured properly, but I dont see where I go wrong...

Basic setup: ifconfig -a wlan1 is connected to my router for WiFi internet uplink by using the EDIMAX EW-7811Un adapter, wlan0 is the Access Point configured with hostapd by using EDIMAX EW-7811Un adapter.

enter image description here

Network setup

/etc/network/interfaces

https://i.stack.imgur.com/rvgpD.jpg

/etc/wpa_supplicant/wpa_supplicant.conf

I have downloaded and installed a custom version of hostapd from here:

$ wget https://github.com/jenssegers/RTL8188-hostapd/archive/v1.1.tar.gz $ tar -zxvf v1.1.tar.gz $ cd RTL8188-hostapd-1.1/hostapd $ make $ sudo make install

This is my /etc/hostapd/hostapd.conf:

Then I've installed this:

$ sudo apt-get install dnsmasq

Now, I have done this, to tell the DHCP server that it controls an IP address range between:

$ sudo nano /etc/dnsmasq.d/dnsmasq.custom.conf

enter image description here

Now, I have entered to configure the DHCP server to use wlan1 as the device that manages DHCP requests and point the DNS to the Google public DNS servers. Here:

enter image description here

But in this step, every time I delete or comment out those fields that are assigned by my ISP automatically as seen on picture, they keep coming back after Pi reboot. I don't know why that happens, but saving doesn't work here for some reason.

Now, at this point I the two WiFi adapters are blinking, but I cant see the wlan0 WAP's network SSID broadcasting where in theory I should, as I think I've done everything..

My IP Tables, please see below:

enter image description here

As per eftshift0's suggestion I attach the sudo ip link and route (sorry I couldnt attach more links).

When the system boots, already with all the interfaces running including VPN:

https://i.stack.imgur.com/A5pQI.jpg
https://i.stack.imgur.com/XLYyO.jpg

After I kill the VPN service with sudo service openvpn stop:

https://i.stack.imgur.com/ElGRW.jpg

I am completely lost in what Im doing wrong. I think it's the IP's I have configured wrong, but I can't figure it out myself... Can anyone please help me?

  • When you start the vpn, can you show us the output of these commands? Add them to the original question, if you want: - ip link show - ip addr show - ip route show – eftshift0 Apr 19 '18 at 20:39
  • even better, run the commands before and after vpn is started – eftshift0 Apr 19 '18 at 20:40
  • @Redundant, where are you going with those edits? – Ghanima Apr 21 '18 at 13:07
0

The first routing rule when vpn is working is sending traffic to a lot of IPs through the VPN (0.0.0.0/1).

  • Sorry, but I am kind of a noob at this, still in the learning process. Is this bad or..? Can I fix this somehow? – Redundant Apr 19 '18 at 21:35
  • Well.... It's not 'good' or 'bad'. It all depends on what you 'want'. What that rule is saying is that all traffic that is going to this block of addresses will go out THROUGH the VPN link and not the other link that is normally used when the VPN is down: from 0.0.0.0 until 127.255.255.255. and that is A LOT of IPs, actually. A major portion of all addresses that are used normally on internet. Is that's not what you intended, then that's bad. Where is that rule set up? I guess you have to look at the VPN configuration files (both nodes if that's the client). – eftshift0 Apr 19 '18 at 22:18
  • What exactly is the solution now? – Ingo Apr 20 '18 at 8:58
  • So I guess I'm going to have to do it from scratch... again until I get it setup. Can you please tell me whether the IPs look okey? Because I was kinda confused, since tutorials showed 192.168...etc. and I use 100.x.x, that's where I kinda lost it a bit. – Redundant Apr 20 '18 at 9:12
  • 1
    Thank you foe being active in this thread eftshitft. I have used the 100.x.x.x IP since that's how the IP assigned to me by my ISP is structured. Is that wrong way to approach it? And I Know, I have included picture since I couldn't SSH to the RPi for some reason, but I will fix this. I will do the ip rotute del 0.0.0.0/1 when I get back home. – Redundant Apr 20 '18 at 15:08

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.