How do I get a static ip address from the VPS via Wireguard?

Hello!

Please tell me if it is possible to implement such a scheme on openwrt - there is a provider with a gray ip address and wireguard, which is already configured and working properly, it is necessary to do so that the client receives an external ip address from the wireguard server, that is, a static VPS address, and not 10.0.0.1. Is it possible to do so?

What do you mean by “gray ip address”?

No, this is not possible, nor is it desirable. Instead, you will use the RFC1918 addresses (such as 10.0.0.1 or whatever is being used in this context) for the WG interface, and then you will send the traffic through the tunnel and it will appear that the traffic is coming from (and returning to) the IP address of the far side peer (i.e. ‘server’) public IP address.

Is that not working right now?

1 Like

What do you mean by “gray ip address”?

10.172.99.86 - something like that.

Is that not working right now?

Thank you, for the answer, it is a pity that it will not work. Yes, this is how everything works.

If you have public IP space nobody forbids it that you use these on your wireguard interfaces.

This would be a NAT/CG-NAT address. This is okay for one side of the tunnel (the ‘client’), but the other side must have a public IP.

What do you mean by this? Have you configured a ‘server’ on a peer with a public IP? If you want to share your configs, we can look them over and help you fix any errors.

It sounds like the OP wants a conventional VPN where everything tunnels to the VPS and appears on the VPS public IP.

1 Like