From d08a0ede1d2cb15bb14b0ff75eacf5c682b1fa0a Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Tue, 6 Dec 2011 12:36:58 -0600 Subject: Initial import of year-and-a-half-old upstream version 0.9.6a --- doc/README.SSH_VPN | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 doc/README.SSH_VPN (limited to 'doc/README.SSH_VPN') diff --git a/doc/README.SSH_VPN b/doc/README.SSH_VPN new file mode 100644 index 0000000..0fb9af0 --- /dev/null +++ b/doc/README.SSH_VPN @@ -0,0 +1,58 @@ +You need to have enabled the following options in /etc/ssh/sshd_config (Server): + +PermitTunnel yes +PermitRootLogin yes + +Minimum requirement is OpenSSH 4.3 and ksshaskpass/ssh-askpass-gnome. + +TUN and TAP modes are supported. + +Network configuration can be made automaticlly (default) or by execution an specified script on server. If script is used the following parameters will be given: + +Parameter 0: script name e.g. /root/ssh_vpn_up.sh +Parameter 1: device type e.g. tun +Parameter 2: ip address e.g. 1.2.3.4 (tun) +Parameter 3: remote ip address 1.2.3.5 (tun) + +On automatic configuration tun0/tap0 will be used. + +Example script on server: + +###### /root/ssh_vpn_up.sh ##### +#!/bin/bash + +# $0 script name /root/ssh_vpn_up.sh +# $1 device type tun|tap +# $2 ip address 1.2.3.4 (tun) +# $3 remote ip address 1.2.3.5 (tun) + +device="tun0" +ip="" +remote_ip="" +type="tun" + +echo "type: $1" + +if [ $# -gt 0 ]; then + type="$1" + if [ $# -gt 1 ]; then + ip=$2 + if [ $# -gt 2 ]; then + remoteip=$3 + fi + fi +fi + +if [ "$type "="tun" ]; then +echo "tun!" +/sbin/ifconfig $device $ip pointopoint $remoteip up +fi + +if [ "$type"="tap" ]; then +echo "tap!" +netmask="255.255.255.0" +ip="10.0.0.1" +device="tap0" +/sbin/ifconfig $device $ip netmask $netmask up +fi +############ END ########## -- cgit v1.2.1