HOWTO Setup a Windows-VPN-tunnel with ZeBeDee

My problem

I found ZeBeDee many years ago and liked the simple approach of a VPN-tunnel. After using it for accessing different windows machines a problem arose with Windows 7.

Tunnel Basic Setup, Client Side

  1. Setup av loopback adapter:
    1. System->Control Panel->Add Hardware
    2. Yes, Hardware is already connected
    3. Add a new hardware device (at bottom of list)
    4. Install the hardware that I manually select
    5. Network adapters
    6. Microsoft , Microsoft Loopback Adapter
    7. (Go through the installation procedure.)
  2. Enter a fake address, e.g. 192.168.192.168 (255.255.255.0)
    1. Open your new fake ethernet adapter (Network Connections)
    2. Disable Client for Microsoft Networks.
    3. Disable File and Printer Sharing for Microsoft Networks
    4. Enable Interent Protocol (TCP/IP)
    5. Click on properties for TCP/IP.
    6. Enter your chosen IP address (192.168.192.168), subnet mask (255.255.255.0), and nothing else
    7. Under advanced->WINS, Disable NetBIOS over TCP/IP
  3. Disable Port445, I used the following registry script
    Windows Registry Editor Version 5.00
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Ole]
    "EnableDCOM"="N"
    "EnableRemoteConnect"="N"
    
    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NetBT\Parameters]
    "TransportBindName"=""
    "SmbDeviceEnabled"=dword:0
    
    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TCPIP6\Parameters]
    "DisabledComponents"=dword:000000ff
    
  4. You need to reboot.
  5. Check netstat -an to see that 0.0.0.0 does not bound to 445
  6. Download ZeBeDee to the Client
  7. Unzip into a folder, I use C:\Programs\ZeBeDee
  8. Use a config file C:\Programs\ZeBeDee\SERVERNAME_client.zbd
    ####
    # Zebedee client configuration file
    # $Id$
    verbosity 0
    detached false	# (false for service)
    
    # Client mode
    server false
    serverport 8080
    
    # serverhost SERVERNAME.domain.tld
    serverhost 1.2.3.4
    
    # ZBD-Loopback connector for SERVERNAME
    listenip 192.168.192.168
    
    ipmode both	# Operate in mixed TCP/UDP mode
    compression zlib:9	# Allow maximum zlib compression
    keylength 256		# Allow keys up to 256 bits
    keylifetime 36000	# Shared keys last 10 hours
    keygenlevel 2	# Generate maximum strength private keys
    maxbufsize 16383	# Allow maximum possible buffer size
    
    logfile 'c:\Programs\Zebedee\SERVERNAME_client.log'
    #
    include 'c:\Programs\Zebedee\COMPUTERNAME.key'
    
    # Setup tunnels
    tunnel 137:*:137
    tunnel 139:*:139
    tunnel 445/tcp:*:445
    tunnel 3389/tcp:*:3389
    
  9. Install ZeBeDee as a service C:\Programs\ZeBeDee\SERVERNAME_client_install.cmd
    c:
    cd \programs\zebedee
    zebedee -n "ZeBeDee-SERVERNAME-p8080" -Sinstall=c:\programs\zebedee\SERVERNAME_client.zbd
    
    rem zebedee -n "ZeBeDee-SERVERNAME-p8080" -Sremove
    
  10. Start the ZeBeDee Service

Tunnel Basic Setup, Server Side

  1. Download ZeBeDee to the Server
  2. Unzip into a folder, I use C:\Programs\ZeBeDee
  3. Use a config file C:\Programs\ZeBeDee\SERVERNAME_server.zbd
    ####
    # Zebedee SERVER configuration file
    # $Id$
    #
    
    verbosity 0	# (0-5) Output to logg file, when everything ok set to 0...
    detached false	# (false for service)
    
    # Server mode
    server true
    serverport 8080
    
    # Some communcation parameters
    ipmode both	# Operate in mixed TCP/UDP mode
    compression zlib:9	# Allow maximum zlib compression
    keylength 256		# Allow keys up to 256 bits
    keylifetime 36000	# Shared keys last 10 hours
    keygenlevel 2	# Generate maximum strength private keys
    maxbufsize 16383	# Allow maximum possible buffer size
    
    # The Public key for the server
    include 'c:\Programs\Zebedee\SERVERNAME.key'
    
    # The logfile, adjust verbosity above
    logfile 'c:\Programs\Zebedee\SERVERNAME_server.log'
    
    # Private keys, se example
    checkidfile 'c:\Programs\Zebedee\SERVERNAME_clients.id'
    
    # no default redriection
    redirect none
    
    # Tip Use real IP instead of localhost for server
    # Setup ALLOWED targets SERVERNAME IP=192.168.0.11
    target 192.168.0.11:135-139,445,3389
    target 192.168.0.11
    
  4. Install ZeBeDee as a service C:\Programs\ZeBeDee\SERVERNAME_server_install.cmd
    c:
    cd \programs\zebedee
    zebedee -n "ZeBeDee-SERVERNAME" -Sinstall=c:\programs\zebedee\SERVERNAME_server.zbd
    
    rem zebedee -n "ZeBeDee-SERVERNAME" -Sremove
    
  5. Start the ZeBeDee Service

Use Tunnel, eg. map drive

NET USE X: \\192.168.192.168\Shares

Remember to use both allowed targets at SERVER and tunnel at CLIENT when adding ports.

Private/Public Keys

To generate a pair of keys you can use this C:\Programs\ZeBeDee\KeyIdGen.cmd
set c=%1
if "%c%"=="" set c=%COMPUTERNAME%

cd c:\programs\zebedee
zebedee -p >%c%.key
zebedee -P -f %c%.key >%c%.id

Remember to append the SERVERNAME_clients.id file with the row in COMPUTERNAME.id file.

Example scripts above

ZeBeDee_Example.zip

Good Luck

/Jonas

Keywords

zebedee,vpn,tunnel,445,139,port445,port139,net,use,smb,Win7,Windows7,WindowsXP,Windows2008