Notices


Reply
Thread Tools
Posts: 74 | Thanked: 34 times | Joined on Jan 2008
#1
below is my fix to make openvpn work with dnsmasq:

gdiff /etc/oprnvpn/maemo-update-resolvconf.orig /etc/openvpn/maemo-update-resolvconf
Code:
20c20,22
< 
---
> # $1 is tun0
> [ -z $1 ]&&exit 1
> name=$1
46,49c48,50
<     if [ ! -f /etc/resolv.conf.prevpn ] ; then
< 	mv /etc/resolv.conf /etc/resolv.conf.prevpn
<     fi
<     echo -e "$R" > /etc/resolv.conf
---
>     echo -e "$R" > /var/run/resolv.conf.$name
>     pkill -HUP dnsmasq
>     pgrep -f '/usr/sbin/dnsmasq -k -i lo -a 127.0.0.1 -z' ||/usr/sbin/dnsmasq -k -i lo -a 127.0.0.1 -z &
53,54c54,57
<     if [ -f /etc/resolv.conf.prevpn ] ; then
< 	mv /etc/resolv.conf.prevpn /etc/resolv.conf
---
>     if [ -f /var/run/resolv.conf.$name ] ; then
> 	rm /var/run/resolv.conf.$name
>         pkill -HUP dnsmasq
>         pgrep -f '/usr/sbin/dnsmasq -k -i lo -a 127.0.0.1 -z' ||/usr/sbin/dnsmasq -k -i lo -a 127.0.0.1 -z
in my /etc/dnsmasq.conf I add
Code:
resolv-file=/var/run/resolv.conf.tun0
I do need to fix the official openvpn package but this is what I got so far

Last edited by niv; 2011-11-05 at 00:18. Reason: wrong var
 

The Following User Says Thank You to niv For This Useful Post:
Posts: 74 | Thanked: 34 times | Joined on Jan 2008
#2
I still need to add a line to reload dnsmasq:
pkill -HUP dnsmasq
 
Posts: 1,208 | Thanked: 1,028 times | Joined on Oct 2007
#3
resolvconf is not part of the openvpn-applet but openvpn (answering to your request)
 
Reply


 
Forum Jump


All times are GMT. The time now is 22:06.