From: Xavier Neys <neysx@stork.gentoo.org>
To: gentoo-doc-cvs@lists.gentoo.org
Subject: [gentoo-doc-cvs] cvs commit: vpnc-howto.xml
Date: Mon, 14 Jan 2008 17:37:35 +0000 [thread overview]
Message-ID: <E1JETFf-0007cY-Kj@stork.gentoo.org> (raw)
neysx 08/01/14 17:37:35
Modified: vpnc-howto.xml
Log:
#205738 Enhanced Tips and Tricks
Revision Changes Path
1.6 xml/htdocs/doc/en/vpnc-howto.xml
file : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/vpnc-howto.xml?rev=1.6&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/vpnc-howto.xml?rev=1.6&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/vpnc-howto.xml?r1=1.5&r2=1.6
Index: vpnc-howto.xml
===================================================================
RCS file: /var/cvsroot/gentoo/xml/htdocs/doc/en/vpnc-howto.xml,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- vpnc-howto.xml 10 Jan 2008 06:15:12 -0000 1.5
+++ vpnc-howto.xml 14 Jan 2008 17:37:35 -0000 1.6
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/vpnc-howto.xml,v 1.5 2008/01/10 06:15:12 nightmorph Exp $ -->
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/vpnc-howto.xml,v 1.6 2008/01/14 17:37:35 neysx Exp $ -->
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
<guide link="/doc/en/vpnc-howto.xml">
@@ -15,6 +15,9 @@
<author title="Contributor">
<mail link="opfer@gentoo.org">Christian Faulhammer</mail>
</author>
+<author title="Contributor">
+ <mail link="fischer@unix-ag.uni-kl.de">Thomas Fischer</mail>
+</author>
<abstract>
This document details how to connect your workstation to a Cisco VPN
@@ -25,8 +28,8 @@
<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
<license/>
-<version>1.3</version>
-<date>2008-01-09</date>
+<version>1.4</version>
+<date>2008-01-14</date>
<chapter>
<title>Introduction</title>
@@ -755,7 +758,8 @@
</p>
<note>
-The init scripts don't handle DNS separation.
+The init scripts don't handle DNS separation, but you can use the custom
+scripts to achieve that. See <uri link="#tipsscript">Tips and Tricks</uri>.
</note>
</body>
@@ -765,12 +769,13 @@
<chapter>
<title>Tips and Tricks</title>
<section>
+<title>Graphical remote access</title>
<body>
<p>
-If you are looking for a linux application that supports RDP (Remote Desktop
-Protocol) then give <c>grdesktop</c> a try. It's a GUI app written in Gtk that
-fits in well with a gnome desktop, but doesn't require it. If you don't want
+If you are looking for a Linux application that supports RDP (Remote Desktop
+Protocol) then give <c>grdesktop</c> a try. It's a GUI app written in GTK+ that
+fits in well with a Gnome desktop, but doesn't require it. If you don't want
the GUI configuration dialogs that grdesktop provides, then just install
<c>rdesktop</c>. Ultimately, grdesktop is just a frontend for rdesktop.
</p>
@@ -806,6 +811,47 @@
</body>
</section>
+<section id="tipsscript">
+<title>Custom scripts on boot</title>
+<body>
+
+<p>
+The custom-made scripts for the init.d file can be used to setup a user-defined
+routing for the vpnc connection. The examples below show how to setup the
+routing table so that only connections to 123.234.x.x are routed over the VPN
+and all other connections use the default gateway. The example uses
+work-preup.sh to save the current default gateway before starting vpnc (which
+resets the default gateway using the VPN connection). Once vpnc has been
+started, work-postup.sh deletes this new default gateway, restores the old
+default gateway and sets the route for all connections to 123.234.x.x to use
+the vpnc connection.
+</p>
+
+<pre caption="/etc/vpnc/scripts.d/work-preup.sh">
+#!/bin/sh
+route -n | grep -E '^0.0.0.0 ' | cut -c 17-32 >/var/tmp/defaultgw
+</pre>
+
+<pre caption="/etc/vpnc/scripts.d/work-postup.sh">
+#!/bin/sh
+route del -net 0.0.0.0 netmask 0.0.0.0 dev tun1
+route add default gw $(cat /var/tmp/defaultgw)
+route add -net 123.234.0.0 netmask 255.255.0.0 dev tun1
+</pre>
+
+<p>
+The example scripts assume that the vpnc connection uses tun1 as tun device.
+You can set the device name in the connection's configuration file.
+</p>
+
+<pre caption="/etc/vpnc/work.conf">
+Interface name tun1
+IPSec gateway vpn.mywork.com
+Pidfile /var/run/vpnc.work.pid
+</pre>
+
+</body>
+</section>
</chapter>
<chapter>
--
gentoo-doc-cvs@lists.gentoo.org mailing list
next reply other threads:[~2008-01-14 17:37 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-14 17:37 Xavier Neys [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-11-29 0:03 [gentoo-doc-cvs] cvs commit: vpnc-howto.xml Joshua Saddler
2008-01-24 7:39 Joshua Saddler
2008-01-10 6:15 Joshua Saddler
2007-11-07 20:42 Josh Saddler
2007-05-23 8:50 Xavier Neys
2007-05-23 8:50 Xavier Neys
2006-05-09 6:31 swift
2005-08-07 20:15 swift
2005-08-07 20:09 swift
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1JETFf-0007cY-Kj@stork.gentoo.org \
--to=neysx@stork.gentoo.org \
--cc=docs-team@lists.gentoo.org \
--cc=gentoo-doc-cvs@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox