Virtual VXLAN using TUN interfaces
Go to file
2025-01-07 22:02:02 -06:00
sysroot First commit. 2025-01-05 22:22:24 -06:00
tun First commit. 2025-01-05 22:22:24 -06:00
vxlan Fix release makefile 2025-01-05 23:26:56 -06:00
wintun First commit. 2025-01-05 22:22:24 -06:00
.gitignore Fix release makefile 2025-01-05 23:26:56 -06:00
.goreleaser.yaml Fix crash when manually updating with the update command. Updated wintun include in archive to be architecture aware. 2025-01-07 11:15:31 -06:00
config_cmd.go First commit. 2025-01-05 22:22:24 -06:00
config_grpc.go First commit. 2025-01-05 22:22:24 -06:00
config.go Move socket to configuration directory. 2025-01-07 22:02:02 -06:00
devicestate_string.go First commit. 2025-01-05 22:22:24 -06:00
Dockerfile Fix release makefile 2025-01-05 23:26:56 -06:00
flags.go First commit. 2025-01-05 22:22:24 -06:00
go.mod Fix crash when manually updating with the update command. Updated wintun include in archive to be architecture aware. 2025-01-07 11:15:31 -06:00
go.sum Fix crash when manually updating with the update command. Updated wintun include in archive to be architecture aware. 2025-01-07 11:15:31 -06:00
grpc.go First commit. 2025-01-05 22:22:24 -06:00
interface_cmd.go First commit. 2025-01-05 22:22:24 -06:00
interface_grpc.go First commit. 2025-01-05 22:22:24 -06:00
interface.go First commit. 2025-01-05 22:22:24 -06:00
LICENSE.txt First commit. 2025-01-05 22:22:24 -06:00
listener_cmd.go First commit. 2025-01-05 22:22:24 -06:00
listener_grpc.go First commit. 2025-01-05 22:22:24 -06:00
listener.go Add listener bind interface check to wait for interface to become available in the event that the system has just booted and the bind is to a virtual interface. Also added better service signal loop break handling. 2025-01-07 21:11:28 -06:00
main.go Move socket to configuration directory. 2025-01-07 22:02:02 -06:00
Makefile Fix release makefile 2025-01-05 23:26:56 -06:00
masquerade.go First commit. 2025-01-05 22:22:24 -06:00
promiscuous_unix.go First commit. 2025-01-05 22:22:24 -06:00
promiscuous_windows.go First commit. 2025-01-05 22:22:24 -06:00
README.md First commit. 2025-01-05 22:22:24 -06:00
server_cmd.go Add listener bind interface check to wait for interface to become available in the event that the system has just booted and the bind is to a virtual interface. Also added better service signal loop break handling. 2025-01-07 21:11:28 -06:00
service_cmd.go First commit. 2025-01-05 22:22:24 -06:00
update_cmd.go First commit. 2025-01-05 22:22:24 -06:00
updater.go Fix crash when manually updating with the update command. Updated wintun include in archive to be architecture aware. 2025-01-07 11:15:31 -06:00
utils.go First commit. 2025-01-05 22:22:24 -06:00
wintun-source.md First commit. 2025-01-05 22:22:24 -06:00

virtual-vxlan

Virtual VXLAN is a tool written to allow VXLAN interfaces to be used on Windows. I may also add support for other operating systems as well, but for now this is a Windows and Linux only project due to immediate needs. The tool uses Wintun and the WireGuard-go tun drivers to make virtual interfaces, then it listens for vxlan packets over UDP and does translations between the tun interface and the vxlan listener.

Install

You can either download the latest binary from the releases, or you can build this project. For better performance on Windows, install Npcap.

Building

You can build as follows:

make deps
make

Running as a service

This project includes service support built in, simply install and start it as follows:

virtual-vxlan service install
virtual-vxlan service start

Running from cli

If you are developing the software, or need more debug output. It may be worth running from the cli.

virtual-vxlan server --log-level=debug

Config

The configuration is mainly managed by the service itself, however you may set manual configurations according to the config.go file.

Usage

The cli has extensive help available via the following:

virtual-vxlan --help

Basic setup of a vxlan service is as follows.

  • Start the service and/or server.

  • Add vxlan listener:

virtual-vxlan listener vxlan add --address='10.0.0.2:4789' --permanent

Note: It is important to use the IP adddress of an interface on the system to allow the interface to be put into promiscuous mode, which is required as otherwise hardware vxlan filtering will block the packets from being received and sent. This is a known issue on Windows, however it has not been tested on other operating systems.

  • Add tun interface to the vxlan listener:
virtual-vxlan listener vxlan interface vxlan20 add --vni=20 --permanent
  • Set an IP address on the interface:
virtual-vxlan listener vxlan interface vxlan20 set-ip-addresses --ip-address=192.168.30.0/24
  • Set a default destination for vxlan packets:
virtual-vxlan listener vxlan interface vxlan20 add-mac-entry --mac="00:00:00:00:00:00" --destination="10.0.0.3" --permanent
  • Save the configuration:
virtual-vxlan config save