Hey! Have some problems with the script. i installed it but i have no access to the local lan or to the internet.
My current config is:
IP Dockstar: 192.168.1.2
IP Router: 192.168.1.1
Laptop:
Dockstar:
From your laptop over VPN:
* can you ping your home gateway (router)?
No.
* can you ping news.bbc.co.uk?
No.
* can you ping 212.58.244.57?
No.
* does DNS work? (i.e. nslookup www.demon.net)
No.
* does your laptop /etc/rescolv.conf look like your dockstar's /etc/resolv.conf ?
Dockstar:
Laptop:
No.
Here's a copy of my current openvpn.conf:
Routes dockstar:
Routes Laptop:
Thanks for your help!
EDIT:
ok i think i know now what my problem is:
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o $LAN_IFACE -j MASQUERADE
Result:
My current config is:
IP Dockstar: 192.168.1.2
IP Router: 192.168.1.1
Laptop:
tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 inet addr:10.8.0.6 P-t-P:10.8.0.5 Mask:255.255.255.255 UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:354 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:0 (0.0 B) TX bytes:22962 (22.9 KB)
Dockstar:
tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 inet addr:10.8.0.1 P-t-P:10.8.0.2 Mask:255.255.255.255 UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1 RX packets:662 errors:0 dropped:0 overruns:0 frame:0 TX packets:11 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:85872 (83.8 KiB) TX bytes:924 (924.0 B)
From your laptop over VPN:
* can you ping your home gateway (router)?
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data. ^C --- 192.168.1.1 ping statistics --- 19 packets transmitted, 0 received, 100% packet loss, time 18144ms
No.
* can you ping news.bbc.co.uk?
No.
* can you ping 212.58.244.57?
PING 212.58.244.57 (212.58.244.57) 56(84) bytes of data. ^C --- 212.58.244.57 ping statistics --- 10 packets transmitted, 0 received, 100% packet loss, time 9070ms
No.
* does DNS work? (i.e. nslookup www.demon.net)
No.
* does your laptop /etc/rescolv.conf look like your dockstar's /etc/resolv.conf ?
Dockstar:
nameserver 192.168.1.1
Laptop:
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN nameserver 127.0.1.1
No.
Here's a copy of my current openvpn.conf:
#verb 3 #log-append /var/log/openvpn.log dev tun server 10.8.0.0 255.255.255.0 ifconfig-pool-persist ipp.txt ca ca.crt cert server.crt key server.key dh dh1024.pem push "route 10.8.0.0 255.255.255.0" push "redirect-gateway local def1" comp-lzo keepalive 10 60 ping-timer-rem persist-tun persist-key group daemon daemon
Routes dockstar:
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 eth0 10.8.0.0 10.8.0.2 255.255.255.0 UG 0 0 0 tun0 10.8.0.2 0.0.0.0 255.255.255.255 UH 0 0 0 tun0 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
Routes Laptop:
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 10.8.0.5 0.0.0.0 UG 0 0 0 tun0 10.2.0.0 0.0.0.0 255.255.0.0 U 9 0 0 wlan0 10.8.0.0 10.8.0.5 255.255.255.0 UG 0 0 0 tun0 10.8.0.1 10.8.0.5 255.255.255.255 UGH 0 0 0 tun0 10.8.0.5 0.0.0.0 255.255.255.255 UH 0 0 0 tun0 169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 tun0 178.*.*.* 10.2.0.1 255.255.255.255 UGH 0 0 0 wlan0
Thanks for your help!
EDIT:
ok i think i know now what my problem is:
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o $LAN_IFACE -j MASQUERADE
Result:
iptables v1.4.14: can't initialize iptables table `nat': Table does not exist (do you need to insmod?) Perhaps iptables or your kernel needs to be upgraded.