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?

3
  • 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, 2018 at 20:39
  • even better, run the commands before and after vpn is started
    – eftshift0
    Apr 19, 2018 at 20:40
  • @Redundant, where are you going with those edits?
    – Ghanima
    Apr 21, 2018 at 13:07

1 Answer 1

1

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

12
  • 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, 2018 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, 2018 at 22:18
  • What exactly is the solution now?
    – Ingo
    Apr 20, 2018 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, 2018 at 9:12
  • that is a good point... I actually didn't notice it. Why are you using 100.x.x.x on the VPN? That is a 'public' segment of IP addresses. There are 3 segments of IP addresses that are used for private networks (like to set up a VPN). arin.net/knowledge/address_filters.html Can't see the images where I am right now so can't tell you anything else about the IPs.... will check and comment when I can (if you had used text as adviced, I'd be able to comment right away).
    – eftshift0
    Apr 20, 2018 at 14:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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