2

I have an AWS VPN set up. I have just tested connecting and disconnecting to my VPN from my PC in my office. Everything works fine, but I noticed that each time I get a different IP address assigned to my remote PC. For example:

  • 12.0.0.32
  • 12.0.0.147
  • 12.0.0.92 ...

I want to have the same local IP address assigned to the PC. That way, I could set up a firewall rule to direct traffic from a particular domain to a specific port on my remote PC and do testing of some server code while in development mode, without resorting to something like ngrok.

NOTE: I believe my question is different from the many questions I have seen on SO where people want to have a static IP assigned to their VPN (public facing WAN address) or to their load balancer. This is not what I want. I just want the AWS side software to assign the same local IP address to my remote PC when I connect to the VPN so I can write the firewall rule to redirect traffic to my remote PC. By local IP address I mean the IP address assigned to my remote PC as a node on the VPN private subnet.

I am the only user that connects to this VPN sub-net so there is no problem with locking out other users if the same local IP address is assigned to an incoming VPN client connection.

How can I do this?

Robert Oschler
  • 14,153
  • 18
  • 94
  • 227

0 Answers0