This example is for the most common use case of WireGuard, which is a peer-server configuration. That means peers will tunnel all traffic to the server, then to the Internet, like a commercial available VPN.
First, we will need to know what is our default network interface, the one that is connected to your local network, or publicly.
Look for the interface have the IP address you want (inet). In my case it would be eth0.
Now, we can head to WGDashboard and add a configuration. Feel free to change the Configuration Name, Listen Port and IP Address/CIDR as you want
Then we scroll to the bottom and expand Optional Settings. To be able to have our peer's traffic go out from the server, we need to setup iptables rules. In this example, we will need to set PostUp and PostDown
PostUp
iptables -A FORWARD -i wg0 -j ACCEPT; iptables -A FORWARD -o wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;