Mailing List Archive

Dinamically changing /etc/resolv.conf (in connection with using openvpn)
Is there package "resolvocnf" in maemo or etc.?
I need in the next: when I use openvpn I need to have in
/etc/resolv.conf a record indicating to dns-servers which can resolve
dns-address of my vpn to ip and after connection - changes nameservers
to the vpn-server's ip (for making dns-queries only through vpn).
I intended use package resolvconf such as it
http://packages.debian.org/squeeze/resolvconf but I didn't find it in
maemo repos.
_______________________________________________
maemo-users mailing list
maemo-users@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-users
Re: Dinamically changing /etc/resolv.conf (in connection with using openvpn) [ In reply to ]
Hi!
Just try to change /etc/openvpn/maemo-update-resolvconf like this:



source /etc/osso-af-init/af-defines.sh

for acct in `mc-tool list | grep sofiasip/sip`; do
mc-tool update $acct string:local-ip-address=$4
done

;;

down)
if [ -f /etc/resolv.conf.prevpn ] ; then
mv /etc/resolv.conf.prevpn /etc/resolv.conf
fi

source /etc/osso-af-init/af-defines.sh

for acct in `mc-tool list | grep sofiasip/sip`; do
mc-tool update $acct clear:local-ip-address
done



The sofiasip lines are for changing the external IP address
during the VPN connection.

Thomas
Re: Dinamically changing /etc/resolv.conf (in connection with using openvpn) [ In reply to ]
Am 16.04.2012 05:12, schrieb James Brown:
> Is there package "resolvocnf" in maemo or etc.?
> I need in the next: when I use openvpn I need to have in
> /etc/resolv.conf a record indicating to dns-servers which can resolve
> dns-address of my vpn to ip and after connection - changes nameservers
> to the vpn-server's ip (for making dns-queries only through vpn).
> I intended use package resolvconf such as it
> http://packages.debian.org/squeeze/resolvconf but I didn't find it in
> maemo repos.

If I remember correctly I first installed the openvpn-switching applet
which pulls all neccesary packets including a kind of resolvconf.
As Thomas already wrote there is a file
/etc/openvpn/maemo-update-resolvconf then wich controls the behavior.

Friends and me are using a modified one which allows to do VOIP-Calls
via Openvpn, please be aware that you have to install the package
libmissioncontrol-utils to use it:

https://www.zerties.org/index.php/Voip_over_zan

The corresponding config-File-example you find here:

https://www.zerties.org/index.php/ZAN_Roadwarrior_Konfiguration

Sorry for it's only in german, but if you have any questions I'll be at
your service.

CU Michael
--
"Software is like sex; it's better when it's free" (Linus Torvalds)
_______________________________________________
maemo-users mailing list
maemo-users@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-users
Re: Dinamically changing /etc/resolv.conf (in connection with using openvpn) [ In reply to ]
On Mon, Apr 16, 2012 at 03:12:27AM +0000, James Brown wrote:
> when I use openvpn I need to have in /etc/resolv.conf a record indicating to
> dns-servers which can resolve dns-address of my vpn to ip and after
> connection - changes nameservers to the vpn-server's ip (for making
> dns-queries only through vpn).

FYI, the Diablo version's /etc/openvpn/maemo-update-resolvconf
does not require resolvconf.

I would still prefer something that works with the existing dnsmasq
setup (perhaps hijack /var/run/resolv.conf.lo for example) in order to
reduce traffic etc, but the above should get you working.

L.
_______________________________________________
maemo-users mailing list
maemo-users@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-users