Introduction

Microsoft Windows does not natively support Generic Routing Encapsulation (GRE) or IP-in-IP (IPIP) tunnels. However with the assistance of a userland client (available to all X4B clients) these features can be emulated and it therefore possible to fully encapsulate (preserve backend IP) services running on the Microsoft Windows platform.

This software which is provided through the Dashboard of your X4B Account, from the Tunnel Page Action > Setup will automatically configure a GRE, IP-in-IP (IPIP).

This Guide is up to date as of software version 3.0.x

Notes

  • Windows Firewall will be enabled on the server, ensure all your services are whitelisted in your firewall.
  • Tested on Windows Server 2018, Windows 7, 8.1 & 10 & Windows Server 2012 & 2018 (Requires Windows 7/Server 2010 or later)
  • Supports both IP-in-IP and GRE tunnels
  • Requires an Ethernet (802.1) Internet Connection
  • The tunnel software supports multiple tunnels in a single instance. Running multiple instances of the tunnel software is not supported.

Steps

Please follow the steps below carefully.

Step 1

Download and install Npcap from the Npcap Downloads page. Npcap is a Driver for capturing packets from the Network card before the Operating system's network stack processes them. WinPCAP can also be used. Npcap must be installed installed in WinPCAP compatibility mode.

Step 2

Automatically Start WinPCAP Driver

While installing WinPcap you will be asked if you would like the driver to start on boot. Please ensure that you configure the driver to start on boot automatically.

Step 3

Download and install OpenVPN's TUN/TAP Driver. If you have already installed OpenVPN you should already have the driver installed.

Only the TUN/TAP driver is required to be installed, OpenVPN is not required. We recommend installing the latest version of the driver (latest tested 9.24.2). A list of all versions can be found here.

From 4.0.0 (currently pre-release) Wintun can be used instead of OpenVPN Tun/TAP. Simply place the x86 wintun.dll file in the same directory as the x4b-wintunnel.exe file (and working directory) to activate. This driver is theoretically faster but currently highly experimental. We welcome feedback.

Latest tested version of Wintun is 0.13.x

Step 4

Components to Install

When installing the TUN/TAP driver select to install the supplied utilities when asked. The screen may look like the above, note that both the Adapter (driver) and TAP Utilities are selected.

Install Tun/Tap Driver

If asked during setup, you must agree to trust the driver developed by OpenVPN. OpenVPN developed of the TUN/TAP driver being installed.

Step 5

Restart your server to load / activate the PCAP and TUN/TAP drivers.

This is an Important Step. Please do not skip. Skipping usually results in adapter not found or not supported issues.

Step 6

From your X4B services Tunnels page, find your tunnel and navigate to Action > Setup. From here you can download the customized tunnel application to your Windows server.

Step 7

Run this application as Administrator. On Windows 7 or greater this can be done via Right Click > Run as Administrator if you are not logged in as the Administrator user.

You may also wish to add this executable to your startup to run on boot. In that case ensure that you have "Run as Administrator" enabled in the compatibility properties.

Conclusion & Testing

Your tunnel should now be online. You should now be able to ping the EncapsulatedRemote address from your Windows Server.

Running the Web Server / Game Server / Service

Ensure that your game server, web server or service is correctly bound to the 10.x.x.x interface on your PC. The IP address for your backend tunnel can be found in the Tunnel Information page.

If your game server is unable to bind to a specific interface you may need to utilize a 3rd party utility to do so (e.g ForceBindIP)

Troubleshooting

Like Tunnels running on Linux or BSD ensure your game server or service is bound to the tunnel IP address (running on 10.x.x.x). This will ensure all communication is made through the protected IP, and received through the protected IP.

We also recommend adding a ICMPv4 allow all rule in "Windows Firewall with Advanced Security" to allow us to ping your backend. This will look something like:

ICMP Allow

Customer Provided Notes: - Some customers have reported that for Windows Server 2012 R2 you need tap-windows-9.9.2_3

NAT

If you are behind NAT, or the Local address provided in our interface is not found on the server X4B WinTunnel will ask you to provide an interface and the application will bind to the main IP of that interface. It is your responsibility to ensure that GRE/IP-in-IP traffic sent to the publicly routable address provided in the interface is delivered to your backend.

We can not provide you with much assistance with these setups as each router / NAT device is different. You may however be able to set your backend server to the DMZ and this may forward the IP traffic to your backend server.