Register
Downloads
Community
Development
News
TALK
maemo.org
>
Community
>
User forum
> Re: Dinamically changing /etc/resolv.conf (in connection with using openvpn)
Bugs and features
Application Catalog
User forum
Developer forum
maemo-community
Presentations
Community Projects
Community Council
Board
Brainstorm
Contribute
IRC
Mailing Lists
Reporting security issues
Re: Dinamically changing /etc/resolv.conf (in connection with using openvpn)
Re: Dinamically changing /etc/resolv.conf (in connection with using openvpn)
Thomas Maass
Karma: 150
2012-04-16 13:14 UTC
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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iQEcBAABAgAGBQJPjBtRAAoJEMMw//HTGq7qhToIAI7JmhoA82NPv8eazYvqowLj
2hb+tBOfLna1Xu2Dag40L7DbnfKHqRO8G26sFnAoUD4GUouBWHCDVEuKDMSRkKB4
ka7OxUEEZoy9+n5Eb5Auysye7KiunCCtciVC3ubt75YU+4qncCQWtXdnCPRi/P1E
mOFLSYUlr0x7NdhGp2jMUlBnhNd2+TU35bCneaIu2T+ENdYPrAnUM8UCY4i8F/mn
ccOj9IaAV/DPbmG2Mf9/dqDd9xVZ3eEjjoXloMbzCb9pEeBDfHYo6FgDmrV6Vem7
vWxbD/CMn/uck0kQ0/S+bviB4xbd5k3R6Uvd1I8ux+qDSmMcxuzooJ8rXzfPJzs=
=y7kV
-----END PGP SIGNATURE-----
Reply
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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iQEcBAABAgAGBQJPjBtRAAoJEMMw//HTGq7qhToIAI7JmhoA82NPv8eazYvqowLj
2hb+tBOfLna1Xu2Dag40L7DbnfKHqRO8G26sFnAoUD4GUouBWHCDVEuKDMSRkKB4
ka7OxUEEZoy9+n5Eb5Auysye7KiunCCtciVC3ubt75YU+4qncCQWtXdnCPRi/P1E
mOFLSYUlr0x7NdhGp2jMUlBnhNd2+TU35bCneaIu2T+ENdYPrAnUM8UCY4i8F/mn
ccOj9IaAV/DPbmG2Mf9/dqDd9xVZ3eEjjoXloMbzCb9pEeBDfHYo6FgDmrV6Vem7
vWxbD/CMn/uck0kQ0/S+bviB4xbd5k3R6Uvd1I8ux+qDSmMcxuzooJ8rXzfPJzs=
=y7kV
-----END PGP SIGNATURE-----