Bound several public address to the same WAN interface, outgoing ip?



  • I need to NAT several public IPs to different internal networks.

    Setting two address to the same phisical

    So I set, for example, a second IP to the WAN interface (first IP is 194.176.12.1 - for example):

    ifconfig em1 194.176.12.2 netmask 255.255.255.192

    When I navigate, sometime I have 194.176.12.1, sometime I have 194.176.12.2. How can I force the outgoing IP for my internal network?
    How can I force the outgoing IP for a specific natting?

    Any conseil will be appreciated.



  • Never use ifconfig aliases. They won't survive a reboot, aren't necessary, and is the wrong way to setup additional IP's on pfsense. See the Virtual IP page. Then look at the NAT page, Outbound tab. You'll need to enable Advanced Outbound NAT, and put in your NAT rules as desired.



  • @cmb:

    Never use ifconfig aliases. They won't survive a reboot, aren't necessary, and is the wrong way to setup additional IP's on pfsense. See the Virtual IP page. Then look at the NAT page, Outbound tab. You'll need to enable Advanced Outbound NAT, and put in your NAT rules as desired.

    Thank you,
    now 1:1 NAT works!  :)

    I have not used Outbound tab because from which I understood "Automatic outbound NAT rule generation (IPSEC passthrough)" is sufficient.

    I also had to create a rules on the WAN interface to allow traffic from * to the destination internal address, it works, is it the correct way to let packet pass?

    Thank you in advance.

    Davide.


Log in to reply