WireGuard can be configured/run via the web interface, or at the command line. Either interface lets you configure Wireguard settings and generate configuration scripts. This page describes how to configure Wireguard through the web interface.
To configure WireGuard manually, and for some basic theory, see the HOWTO: Set up WireGuard . That page is more appropriate when you're not using an external VPN provider. It is more intended to discuss the configuration VPNs with a hub-and-spoke or mesh topology.
Unless using an external VPN provider, it's best to “nominate” a main router that will produce configurations. Clients, such as other FreshTomato routers and other devices, must import the configuration generated by this main router. Relevant configuration changes may require you to delete and reimport the configuration on those client devices.
The WireGuard web interface menu has been working since r2024.1. IPv4 is fully supported, but IPv6 is not supported at this time.
Policy-based Routing and the kill switch feature are supported since r2025.3. Split-tunneling is supported within Policy-based Routing.
Two serious bugs in r2025.3 and earlier can cause kernel panics. See the WireGuard Notes and Troubleshooting section at the bottom for details.
Starting with r2025.3, FreshTomato supports the import of preconfigured Wireguard configuration scripts from external VPN providers.
These VPN providers' scripts have been tested as working:
Alternatively, many have successfully used the following tutorial to manually configure settings for an external VPN Provider:
How to Connect to a VPN Provider's WireGuard Tunnel on FreshTomato
Icons here indicate the tunnel/service status, and also allow you to stop and start the tunnel/service.
indicates the Wireguard service isn't running and no VPN tunnel currently exists on this interface.
clicking this starts the WireGuard service, and makes the interface negotiate a VPN tunnel to peers.
indicates the selected WireGuard connection is running, and connected to the configured peers.
terminates the current WireGuard VPN tunnel and stops the service.
WireGuard uses virtual network adapters (or “network interfaces”) on which to operate a VPN tunnel. WireGuard creates a virtual network interface (such as “wg0”) on your device that behaves like a standard network adapter. This virtual adapter routes your traffic through the encrypted tunnel between peers.
Wireguard allows you to create 3 separate virtual network adapters to allow for 3 separate VPN configurations (or “instances” in WireGuard terminology). In Freshtomato, each virtual adapter is represented by a tab, such as wg0, wg1, or wg2.
the first Wireguard interface/instance.
the second Wireguard interface/instance.
the third Wireguard interface/instance.
Each interface/tunnel tab can contain its own unique configuration, encryption keys, and so on. Options for each interface are explained below.
here, you enter the main configuration settings for the chosen interface.
Enable on Start - makes FreshTomato start Wireguard at boot, build the tunnel and connect to peers.
This is currently NOT recommended until some serious bugs are fixed. See the WireGuard Notes and Troubleshooting section for details.
Poll Interval - WireGuard's PersistentKeepalive setting.
This determines how often the client sends keepalive packets to maintain NAT mappings when behind NAT.
Config file - here, enter the path to a WireGuard configuration file.
If a path/file is specified here, all other settings in the web interface will be ignored.
Port - the UDP the port on which the interface’s tunnel will be built with the remote endpoints.
This is the same as the “ListenPort” setting in a wg-quick configuration file. Leaving this blank causes WireGuard to automatically choose a different free UDP listening port each time the interface starts.
Private Key - here, enter the private key for the VPN tunnel.
If you import a prebuilt configuration file from an external VPN provider, this should populate automatically.
Public Key - displays the tunnel's public key.
WireGuard automatically generates this using the Private Key. This field cannot be directly edited.
VPN Interface IP - the IP address to be assigned to the virtual network interface.
This is used to communicate only inside the tunnel. It is independent from the physical network interface's IP addresses. To prevent addressing conflicts on participating networks or VPN peers, this must be a unique address space, specifically set aside for the VPN.
It must be written using CIDR notation. For example: “10.0.0.1/32”. Addresses should be separated by commas or newline characters.
DNS Servers (out) - the nameservers the client device will use for DNS lookups once the tunnel is active.
These can be:
This is usually wanted in site-to-site topology VPNs.
This setting is the same as the “DNS” setting in a wg-quick configuration file
FWMark - used to mark outgoing encrypted packets with a firewall mark.
Use of this mark is helpful for configuring advanced routing decisions, such as policy-based routing. It lets the system differentiate and route WireGuard traffic based on the mark, often associating it with a specific routing table. This is the same as the “FwMark” setting in a wg-quick configuration file.
For example, packets marked with a fwmark can be routed through a dedicated route table. This allows you to run complex routing scenarios, such as routing some traffic through the WireGuard tunnel (split-tunnel) or even using multiple tunnels with different policies.
MTU - lets you set the Maximum Transmission Unit.
This is the largest packet size that can be sent over the WireGuard interface without fragmentation.
Respond to DNS - enables dnsmasq to resolve DNS queries arriving on this interface.
Routing Mode - Here, select the mode to used on the WireGuard interface.
This option appears only when one of the Internal hub-and-spoke or mesh VPN types is selected.
Firewall - lets you choose the appropriate firewall setting for your WireGuard setup.
Type of VPN - lets you set the type of VPN topology generated.
Depending on the setting you choose, other fields will appear in which to configure more settings.
To learn about WireGuard topologies, see this webpage: Procustodibus: Primary WireGuard Topologies
Redirect Internet traffic -
in this tab, enter information about the peer parameters.
Status
Please remember these troubleshooting tips when trying to configure your VPN:
The point of failure found will provide critical insight into the type of issue you are facing.