How to NAT before VPN: IPsec

  • Hello, I am requested to stablish a LAN to LAN VPN by using IPSEC.
    The opposite VPN side asks me to fix an IP address as source traffic, this is I've done it successfully.
    Problem is that my LAN is and need to make NAT to before stablishing the VPN.
    I tried everything NAT options with no success:  NAT 1:1,  NAT outbound, etc
    Anyone can help me, please?

  • Thanks for your reply.
    I had already read that topic but unfortunately it is related to OpenVPN and my VPN is IPSEC, and I am obliged to use it.

    This is the configuration:

    My LAN network:

    IPSEC VPN Phase 2:
    Local network:   (this is the only address the other VPN side allows to receive)
    Remote network:

    NAT 1:1
    Interface:  IPSEC
    External IP:
    Internal IP:
    Destination IP:

    I think it should be solved with NAT 1:1 in IPSEC interface, because NAT should be done before establishing the VPN, but does not work   :'(

  • We too are having a similar problem. We were asked to connect one of our computers to another company with an IPSEC VPN. However our computer's IP is and the other company specifically wants us to use on our side for that computer. They said that it's a simple case of NATing their imposed to our computer. Here is a diagram:

      Our IP      Their imposed IP        Our pfSense WAN               Their VPN's WAN      Their computer's IP  -     -    (Internet)    -

    If this IPSEC is set up properly they should be able to reach our computer ( by pinging (their imposed IP for us), and of course we should be able to ping theirs ( from our computer ( From their point of view they only want to access their imposed IP (, they don't really care what our final IP is (

    Their computer's IP ( is probably not the real final IP either, it most likely is being NATed to some other computer in their infrastructure, pretty much like our imposed IP ( should forward  (NAT) to our real computer (, but that isn't important for us to know anyway.

    We have tried to configure pfSense to forward traffic from their to our, and have been all over the Internet looking and trying different configurations, but all to no avail. From what we gathered it seems that pfSense v2.0.1 (which is what we use) still can't do this.

    Can anyone shed some light on this matter?

  • AFAIK pfsense can't do NAT before IPSEC on the same box.


Log in to reply