From Hentschel
Jump to: navigation, search
Line 9: Line 9:
 
'''Important:''' Both sides need to run as root to create the tunnel device. Thus, 'ssh -w 0:0 root@www.hentschel.net' must run as root on the client side too.
 
'''Important:''' Both sides need to run as root to create the tunnel device. Thus, 'ssh -w 0:0 root@www.hentschel.net' must run as root on the client side too.
 
<quote>
 
<quote>
    +---------------+            OpenSSH 4.3          +---------------+
+
        +---------------+            OpenSSH 4.3          +---------------+
    |  hentschel  | tun0 -- Tunnel Interface -- tun0 |  zm.home    |
+
        |  hentschel  | tun0 -- Tunnel Interface -- tun0 |  zm.home    |
    |  Has a tunnel | <------------------------------->|  Has a tunnel |   
+
        |  Has a tunnel | <------------------------------->|  Has a tunnel |   
    |  and ethernet | 10.0.0.100            10.0.0.200 |  and ethernet |
+
        |  and ethernet | 10.0.0.100            10.0.0.200 |  and ethernet |
    +-------+-------+    point to point connection    +-------+-------+
+
        +-------+-------+    point to point connection    +-------+-------+
      eth0 |                creates a bridge                | eth0   
+
          eth0 |                creates a bridge                | eth0   
 
  198.57.187.185 |          that plugs machine B              | 192.168.1.100
 
  198.57.187.185 |          that plugs machine B              | 192.168.1.100
  Routable |                  into network A                  |           
+
      Routable |                  into network A                  |           
  address  |                                                  |
+
      address  |                                                  |
    here    |                                                  |
+
        here    |                                                  |
    +-------+-------+                                  +-------+-------+  
+
        +-------+-------+                                  +-------+-------+  
    |  Network A  |                                  |  Network B  |
+
        |  Network A  |                                  |  Network B  |
    |  The Internet |                                  | 192.168.1.1/24|
+
        |  The Internet |                                  | 192.168.1.1/24|
    |  Has internet |                                  |  Has internet |
+
        |  Has internet |                                  |  Has internet |
    |              |                                  |  NAT gateway  |
+
        |              |                                  |  NAT gateway  |
    +---------------+                                  +---------------+
+
        +---------------+                                  +---------------+
  
 
</quote>
 
</quote>

Revision as of 22:56, 21 March 2017

Setting up VPN via SSHD

from this link

  • enable
    • PermitTunnel yes
  • disable
    • AllowTcpForwarding yes

Important: Both sides need to run as root to create the tunnel device. Thus, 'ssh -w 0:0 root@www.hentschel.net' must run as root on the client side too. <quote>

       +---------------+            OpenSSH 4.3           +---------------+
       |   hentschel   | tun0 -- Tunnel Interface -- tun0 |   zm.home     |
       |  Has a tunnel | <------------------------------->|  Has a tunnel |  
       |  and ethernet | 10.0.0.100            10.0.0.200 |  and ethernet |
       +-------+-------+     point to point connection    +-------+-------+
          eth0 |                 creates a bridge                 | eth0  
198.57.187.185 |           that plugs machine B               | 192.168.1.100
      Routable |                  into network A                  |          
      address  |                                                  |
       here    |                                                  |
       +-------+-------+                                  +-------+-------+ 
       |   Network A   |                                  |   Network B   |
       |  The Internet |                                  | 192.168.1.1/24|
       |  Has internet |                                  |  Has internet |
       |               |                                  |  NAT gateway  |
       +---------------+                                  +---------------+

</quote>