Hi, thank you so much for trying to help me, I really appreciate it!
VPS wg0.conf
:
[Interface]
Address = 10.0.0.1/24
ListenPort = 51820
PrivateKey = REDACTED
PostUp = iptables -t nat -A PREROUTING -p tcp -i eth0 '!' --dport 22 -j DNAT --to-destination 10.0.0.2; iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to-source SERVER_IP
PostUp = iptables -t nat -A PREROUTING -p udp -i eth0 '!' --dport 55107 -j DNAT --to-destination 10.0.0.2;
PostDown = iptables -t nat -D PREROUTING -p tcp -i eth0 '!' --dport 22 -j DNAT --to-destination 10.0.0.2; iptables -t nat -D POSTROUTING -o eth0 -j SNAT --to-source SERVER_IP
PostDown = iptables -t nat -D PREROUTING -p udp -i eth0 '!' --dport 55107 -j DNAT --to-destination 10.0.0.2;
[Peer]
PublicKey = REDACTED
AllowedIPs = 10.0.0.2/32
Homeserver wg0.conf
:
[Interface]
Address = 10.0.0.2/24
PrivateKey = REDACTED
[Peer]
PublicKey = REDACTED
AllowedIPs = 0.0.0.0/0
PersistentKeepalive = 25
Endpoint = SERVER_IP:51820
(REDACTED would've been the public / private keys, SERVER_IP would've been the VPS IP.)
The command you provided for the VPS returns
UDP listen needs -p arg
, so I just added-p
right before the port number and then it worked. Running the homelab command returnsno port[s] to connect to
... Not good.