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
committergregory guy <gregory-tde@laposte.net>2020-02-22 12:44:01 +0100
commit9b99335373bb5e06cfb2cdbbff4f6d45b3d0edda (patch)
tree5414f4b1866fb6ac99d742f217b19f470e1ae477 /doc/misc/README.SSH_VPN
parenta79160540c050b5eaca4ecdcee65ec2e164eae6f (diff)
downloadkvpnc-9b99335373bb5e06cfb2cdbbff4f6d45b3d0edda.tar.gz
kvpnc-9b99335373bb5e06cfb2cdbbff4f6d45b3d0edda.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>
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 ##########