I am trying to configure NAT for my VPN connection. I have one NIC with 5 configured public IP addresses and I want to use one specific IP address for this NAT config.
I have enabled the ipv4 forwarding and successfully configured SNAT, but the internet connection still doesn't work. I am not sure how to configure prerouting.
This is the setup:
- IP addresses
172.20.0.2 - 244are used for the IP address pool for my VPN connection.
- I want to use the IP address
46.xxx.xxx.18as the VPN address. This IP address is configured on
eth0:4and the other IP addresses on
eth0can't be used for this connection.
- The IP address
172.20.0.1is assigned to
With masquerade everything works fine, but I can't select which IP address will be used.
Thank you for your help.