summaryrefslogtreecommitdiffstats
path: root/doc/misc/README.SSH_VPN
diff options
context:
space:
mode:
authorgregory guy <gregory-tde@laposte.net>2020-02-22 12:31:47 +0100
committerMichele Calgaro <michele.calgaro@yahoo.it>2020-02-23 15:34:03 +0900
commit77cd84aae90b8d04f56dfb5b738a58900cd4c0cc (patch)
tree6d5d20934590afbda5e278bdbe27d73a7ca2006d /doc/misc/README.SSH_VPN
parenta5b1b4e3e2c717ae1d392fdf37d7ac0d1f77c51d (diff)
downloadkvpnc-77cd84aae90b8d04f56dfb5b738a58900cd4c0cc.tar.gz
kvpnc-77cd84aae90b8d04f56dfb5b738a58900cd4c0cc.zip
Drop automake build support.
Add basic build instructions. Rework of the README, INSTALL and help page. Remove empty folder templates and the NEWS file. Delete the INSTALL.debian and INSTALL.gentoo files. Create the doc/misc folder to hold lot of config and/or readme files. Signed-off-by: gregory guy <gregory-tde@laposte.net> (cherry picked from commit 9b99335373bb5e06cfb2cdbbff4f6d45b3d0edda)
Diffstat (limited to 'doc/misc/README.SSH_VPN')
-rw-r--r--doc/misc/README.SSH_VPN58
1 files changed, 58 insertions, 0 deletions
diff --git a/doc/misc/README.SSH_VPN b/doc/misc/README.SSH_VPN
new file mode 100644
index 0000000..0fb9af0
--- /dev/null
+++ b/doc/misc/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 ##########