vpn using dynamic DNS connected but no internet (openwrt router as server)

0

1

I have setup a router as server with openwrt. I have added the Dynamic DNS configuration.(I created an account with noip)

When I try to connect through openvpn (in a free wifi) , I am using my domain as gateway,it shows connected to my vpn but I have no internet access.

From the DNS configuration (noip) I am using

Host type: DNS(A)

Is there something else I must do/check?

I also have already done on router:

config  'rule'
    option 'target' 'ACCEPT'
    option 'dest_port' '1194'
    option 'src' 'wan'
    option 'proto' 'tcpudp'
    option 'family' 'ipv4'

The route -n after connected:

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.1.254   0.0.0.0         UG    0      0        0 wlan0
79...........   192.168.1.254   255.255.255.255 UGH   0      0        0 wlan0
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 tap0
192.168.1.0     0.0.0.0         255.255.255.0   U     9      0        0 wlan0
192.168.1.2     127.0.0.1       255.255.255.255 UGH   303    0        0 lo
192.168.1.134   127.0.0.1       255.255.255.255 UGH   303    0        0 lo

The 79... is correct(my external ip). I don't know what 192.168.1.254 is though.

My route -n before connecting to vpn:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 wlan0
192.168.1.0     0.0.0.0         255.255.255.0   U     9      0        0 wlan0
192.168.1.2     127.0.0.1       255.255.255.255 UGH   303    0        0 lo
192.168.1.134   127.0.0.1       255.255.255.255 UGH   303    0        0 lo

192.168.1.1 is routers ip.

I also tried to put in gateway port (at optional settings at network manager)'1194' but this doesn't work either.

UPDATE:

Also , I noticed that resolv.conf before connecting to vpn is:

domain lan
nameserver 192.168.1.1

and when connected:

nameserver 192.168.1.254

Is that right? I tried to put

nameserver myhostname ,but still the same.

George

Posted 2014-01-10T21:03:43.227

Reputation: 167

after connecting, what is the output of "route -n" on the vpn client ? – aseaudi – 2014-01-10T22:30:52.020

@aseaudi:Hello,I updated my post.I think I must find a way to inport the port 1194 to network manager.. – George – 2014-01-11T10:16:24.800

>

  • after you connect to your router, can you ping the lan hosts behind your router?
  • < – aseaudi – 2014-01-11T13:28:41.237

    start="2">

  • your default route is pointing to your vpn server router, remove it and add another default route to the wifi gateway instead, also try to use another subnet for your vpn i.e. 192.168.10.0/24.
  • < – aseaudi – 2014-01-11T13:29:58.697

    @aseaudi:For your first question I can't test it because I have 1 desktop and it can't access signal.The laptop ok.For the second question can you please give write me the instructions?Because I am not sure..You mean "route del 192.168.1.254" and "route add 192.168.1.1." ,while I am connected to vpn? – George – 2014-01-11T13:55:41.320

    @aseaudi:I tried "route add default gw 192.168.1.1 tap0 " ,"route add default gw 192.168.1.1 wlan0 " ,route del default gw 192.168.1.254 wlan0 ,but still nothing – George – 2014-01-11T14:03:47.133

    can you join the chatroom "azure" ? – aseaudi – 2014-01-11T14:12:12.293

    let us continue this discussion in chat

    – George – 2014-01-11T14:14:27.363

    Answers

    1

    Try to assign a different subnet for the vpn.

    For example set the ip address of the vpn server to 10.10.10.1 and vpn client to 10.10.10.2.

    On the router, there is a file /etc/config/openvpn:

    option 'server_bridge' '10.10.10.1 255.255.255.0 10.10.10.2 10.10.10.10'
    

    aseaudi

    Posted 2014-01-10T21:03:43.227

    Reputation: 461