Port Forwarding With IPtables for Wireguard
Setting up a WireGuard VPN on Ubuntu 20.04 was pretty easy, I followed this tutorial: How to setup your own VPN server using WireGuard on Ubuntu
The problems arose when I needed to forward port 27256 on the server to the VPN client. It took me most of a Sunday to figure out.
Initially, set up to forward the different types of packets (NEW, ESTABLISHED, and RELATED) between interfaces (eth0 and wg0):
|
|
Second, foward the port from the server’s VPN IP address (10.10.0.1
) to the client’s VPN IP address (10.10.0.2
):
|
|