Multiple WAN IPs on OPNsense

Started by spetrillo, August 28, 2024, 06:29:00 PM

Previous topic - Next topic
Hello all,

I just want to confirm that I have done it properly, with regards to configuring my WAN interface for two public IPs.

Presently my WAN interface is configured as follows:

Interface: WAN
IPv4 Config Type: Static IPv4
IPv4 address: 133.202.185.221/29
IPv4 GW rules: 133.202.185.217

I have added a vritual IP with the following config:

Mode: IP Alias
Interface: WAN
Network/Address: 133.202.185.220/32
Gateway: 133.202.185.217
Deny service binding: unchecked
VHID Group: blank

Have I configured this correctly? Am I missing anything to make this work?

Thanks,
Steve

When you say "make this work", what is "this"? What are you intending to use the second IP address for?

Allow one web server to communicate on one ip and a second web server to communicate on the second ip.

I think you should NOT set the gateway on the VIP. I'm not sure if it would do any harm, but the recommendation is to not set it unless there's a need to (like a different gateway at the other end of a PPP tunnel). Otherwise I think it should be OK....