| 1 |
-*- outline -*- |
|---|
| 2 |
* OPENSSH tunneling [ossh] |
|---|
| 3 |
|
|---|
| 4 |
** requirements |
|---|
| 5 |
- openssh-clients > 4.3 |
|---|
| 6 |
- tun/tap interface support |
|---|
| 7 |
- tunctl utility |
|---|
| 8 |
|
|---|
| 9 |
** which one |
|---|
| 10 |
etcnet utilizes openssh ability to link two tun/tap ifaces. |
|---|
| 11 |
[ossh] type describes master (initiating) tunnel side, and |
|---|
| 12 |
[tuntap] type describes slave tunnel side. |
|---|
| 13 |
|
|---|
| 14 |
** master iface configuration |
|---|
| 15 |
|
|---|
| 16 |
*** iface/options |
|---|
| 17 |
TYPE=ossh |
|---|
| 18 |
# IP address of remote host [MANDATORY] |
|---|
| 19 |
REMOTE=1.2.3.4 |
|---|
| 20 |
# sshd listen port on remote, defaults to 22 |
|---|
| 21 |
REMOTEPORT=222 |
|---|
| 22 |
# connect as that user, defaults to root |
|---|
| 23 |
REMOTEUSER=ossh |
|---|
| 24 |
# remote iface name, defaults to any |
|---|
| 25 |
REMOTEIF=tun0 |
|---|
| 26 |
# set tuntap interface up on remote, defaults to no, |
|---|
| 27 |
# assuming $REMOTEIF is always up. |
|---|
| 28 |
IFUP_REMOTE=yes |
|---|
| 29 |
# command to invoke on remote to setup $REMOTEIF, |
|---|
| 30 |
# if IFUP_REMOTE is 'yes'; defaults to /sbin/ifup |
|---|
| 31 |
REMOTEIFUP='ifconfig tun0 ....' |
|---|
| 32 |
|
|---|
| 33 |
*** iface/identity |
|---|
| 34 |
contains private ssh key, corresponding public key |
|---|
| 35 |
should be installed on remote |
|---|
| 36 |
|
|---|
| 37 |
*** iface/ipv4address etc |
|---|
| 38 |
as usual |
|---|
| 39 |
|
|---|
| 40 |
** limitations |
|---|
| 41 |
- local interface name MUST be in form tun[0-9]+ or tap[0-9]+ |
|---|
| 42 |
- remote interface name should be of same type, tun or tap |
|---|
| 43 |
|
|---|
| 44 |
** samples, assuming both ends have etcnet installed: |
|---|
| 45 |
|
|---|
| 46 |
*** master side [ossh] |
|---|
| 47 |
--- %< --- tun0/options: |
|---|
| 48 |
TYPE=ossh |
|---|
| 49 |
REMOTE=195.112.124.102 |
|---|
| 50 |
REMOTEIF=tun1 |
|---|
| 51 |
--- %< --- |
|---|
| 52 |
|
|---|
| 53 |
--- %< --- tun0/ipv4address: |
|---|
| 54 |
172.16.4.3 peer 172.16.4.4/32 |
|---|
| 55 |
--- %< --- |
|---|
| 56 |
|
|---|
| 57 |
*** slave side [tuntap] |
|---|
| 58 |
--- %< --- tun1/options: |
|---|
| 59 |
TYPE=tuntap |
|---|
| 60 |
--- %< --- |
|---|
| 61 |
|
|---|
| 62 |
--- %< --- tun1/ipv4address: |
|---|
| 63 |
172.16.4.4 peer 172.16.4.3/32 |
|---|
| 64 |
--- %< --- |
|---|