My public ip is static (after some months maybe change once) and is the one of a pc of my ISP.
I can forward some port of that machine (public ip) to a port of a local machine that I own.
I found a guide to how use wireguard https://www.stavros.io/posts/how-to-con ... wireguard/:
Server /etc/wireguard/wg0.conf
Code: Select all
[Interface]
Address = 192.168.2.1 # This is not the ip of my server right? A new one created for this wg0?
PrivateKey = <server's privatekey>
ListenPort = 51820
[Peer]
PublicKey = <client's publickey>
AllowedIPs = 192.168.2.2/32 # Same thing here
Code: Select all
[Interface]
Address = 192.168.2.2
PrivateKey = <client's privatekey>
ListenPort = 21841
[Peer]
PublicKey = <server's publickey>
Endpoint = <server's ip>:51820 # Can I use <my_public_ip>:<forwarded_port_to_internal_51820>?
AllowedIPs = 0.0.0.0/0, ::/0 # To forward all the traffic
# This is for if you're behind a NAT and
# want the connection to be kept alive.
PersistentKeepalive = 25 # So do I need this value?
Is it possible to use wireguard with NAT (since that my server has not a "direct" ip)?
I tried so but I cannot load any page.