Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
landonious
New Contributor III

Proper way to setup multiple public ip addresses with multiple web servers

Hello. We have 3 public ip addresses and 2 web servers. I would like both to be behind the FortiGate but I want to make sure I set it up properly. From what I understand, I am not supposed to use both WAN interfaces and instead I am supposed to assign multiple ip addresses to one interface. If it matters, one of our ip addresses is on one subnet and the other two ip addresses are on a separate subnet. Ideally, the two webservers would use the single ip address and one of the other two. The only reason is that the dns records already point to these two and i don't want to change them if i don't have to. But if it's easier or better to use the two ip addresses that are on the same subnet, I can update everything as needed. I will still be using the same Fortigate and internet connection for all the devices on the network as well. What all do I need to do to set this up properly? Let's say the following:

 

Public IP address info:

Static Ip 123.45.25.105
Gateway 123.45.25.254
Subnet Mask 255.255.255.0

 

Static Ip 123.45.24.122
Gateway 123.45.24.254
Subnet Mask 255.255.255.0

 

Static Ip 123.45.24.123
Gateway 123.45.24.254
Subnet Mask 255.255.255.0

 

Sales Server 192.168.0.88 (only needs ports 80, 443, 8443) (ideally using public ip 123.45.25.105)

CentOS Server 192.168.1.75 (needs pretty much all ports) (ideally using public ip 123.45.24.122)

 

The CentOS server sends mail so it MUST use the same ip address for outgoing connections. I suppose I could add all the ip addresses to the spf record if absolutely necessary. But I would prefer to keep it all to one public ip address.

 

As far as every other device on the network, ideally I would like all traffic for that to use the third unused ip address, but I don't overly care about that part if it's a problem.

1 Solution
pminarik
Staff
Staff

I would suggest the following as a start, then you can tweak further.

Decide what will be the "generic" IP that your local clients will use to connect to the internet (including the FortiGate itself). Use that as the IP address of the WAN interface.

 

Sales server: Use the public IP in a VIP object to create the 123.45.25.105->192.168.0.88 mapping. Apply further restrictions as needed.

 

CentOS mail server: Use the public IP in a VIP object to create the 123.45.24.122->192.168.1.75. In this case, consider not configuring any port translation, let it be a simple IP->IP mapping. The benefit of this is that it will automatically SNAT the server's outbound traffic to the external IP of the VIP as long as this outbound policy has SNAT enabled. (this "automatic SNAT to the VIP's IP" is a special scenario)

 

Don't forget to use these VIPs in firewall policies (as destination address object), this is what "enables" them.

 

sample configuration: https://community.fortinet.com/t5/FortiGate/Technical-Tip-Virtual-IP-VIP-port-forwarding-configurati...

[ corrections always welcome ]

View solution in original post

20 REPLIES 20
dolunmo2
New Contributor

You could create virtual interfaces on the host to have multiple IPs with only a single interface, and assign your containers to those, with Traefik or nginx or just plain publishing their ports directly to the IPs of the relevant interfaces.

router login 192.168.l.l
Announcements
Check out our Community Chatter Blog! Click here to get involved
Labels
Top Kudoed Authors