By Manny Fernandez

November 9, 2019

Creating a VIP on Fortigate using a Dynamic IP address

When you have a dynamic IP address assigned by your carrier, you are normally only assigned one IP address to use.  If you had a Fortigate that is attached to a Cable Modem as an example and the modem and the Fortigate are using RFC 1918 addresses, then your VIP would use the RFC 1918 address that is assigned to your Fortigate as the External IP Address/Range using the port mapping section, however if your Fortigate gets a public IP (non-RFC1918) address from the carrier directly on the Fortigate, how are you going to know what public IP address to assign to the VIP?  Thanks to a friend of mine Brian Modlin, that called me because he was dealing with this problem; here is what you can do.  In this article, I am using Central NAT.

For those not familiar with RFC 1918, it is the block of IPv4 addresses that are reserved for internal use and are NOT publicly routable.  These are your 10.0.0.0/8, 192.168.0.0/16 and 172.16.0.0/12.

Dynamic DNS Configuration

Lets start with the Dynamic DNS configuration on the Fortigate firewall.

2019-11-09_19-55-39.png

Here we have a Fortigate 80E configured with a DHCP as its WAN1 configuration.  To configure the Dynamic DNS configuration:

  1. Go to Network
  2. Then choose DNS
  3. Enabled the FortiGuard DDNS
  4. Choose the interface facing the carrier, in my case WAN1
  5. Click the Use Public IP Address
  6. Assign a Unique Location or a host name you are going to use.
  7. And finally, click Apply

Configuring the VIP

2019-11-09_19-55-05.png

Here we can see the VIP that has already been created.  I will describe the config.  First things first, you need to assign a name.  Choose the interface, again for me, it was WAN1. Next on the External IP address/range section, you will use 0.0.0.0 since we do not know the IP the carrier will assign to us.  Next choose the internal IP address for the device you are trying to NAT to.  Enable Port Forwarding since you are going to be sharing it with the Fortigate’s dynamically assigned IP address.

Creating the Policy

Finally, we will add a policy. Again, in my case, I am using Central NAT (take a look at the Central NAT blog post)

2019-11-09_19-57-04.png

As you can see in the above screenshot, this is a Camera Server and we can see that we are matching Incoming Interface to WAN1 and the Outgoing Interface is FW VLAN 240 (lan) .  We are also matching all sources and the Destination is the Firewall Address Object of CAMERA SERVER-INT which equates to the 10.131.20.10 address (see below)

Screen Shot 2019-11-09 at 7.57.20 PM.png

You will need to repeat the VIP creation for every port you need to map to.

Hope this helps.

 

 

 

 

Recent posts

  • If you've spent any time configuring user authentication on... Full Story

  • DNS is one of those technologies that quietly underpins... Full Story

  • BGP issues on FortiGate firewalls usually trace back to... Full Story

  • Every time your laptop talks to your router, a... Full Story

  • If you've spent any time configuring NAT on a... Full Story

  • If you have spent any time configuring firewall policies... Full Story

  • High availability on FortiGate is one of those features... Full Story

  • If you've configured SD-WAN on a FortiGate, you've almost... Full Story

  • FortiLink is the management protocol that turns a FortiSwitch... Full Story

  • FortiSwitches are pretty rock solid from Mean Time Between... Full Story

  • This is a quicky tip.  Have you ever gone... Full Story

  • DNS is one of those quiet pieces of internet... Full Story

  • This article is an updated version of the previous... Full Story

  • You will add ns2 as a secondary (slave) BIND9... Full Story

  • In the process of deploying my lab, I needed... Full Story

  • RFC 8805, used to be known as Self-Correcting IP... Full Story

  • Years back, I wrote an article about certificate pinning. ... Full Story

  • FortiGates have the ability to send alerts to Microsoft... Full Story

  • In this post, I am going to walk through... Full Story

  • Troubleshooting VoIP on a FortiGate can feel like trying... Full Story

  • Prior to FortiOS 7.0, there were three commands to... Full Story

  • In this post, I am going to go over... Full Story

  • What we are going to do:  We are going... Full Story

  • Choosing between FGCP (FortiGate Clustering Protocol) and FGSP (FortiGate... Full Story

  • Creating a VLAN on macOS (The "Pro" Move) A... Full Story

  • This blog post explores the logic behind how macOS... Full Story

  • Pretty Fly for a Wi-Fi Tell My Wi-Fi Love... Full Story

  • Part of my daily gig is creating BoMs (Bill-of-Materials)... Full Story

  • ICMP introduces several security risks, but careful filtering, rate... Full Story

  • The command diag debug application dhcps -1 enables full... Full Story

  • In the world of FortiOS, execute tac report is... Full Story

  • LLDP; What is it The Link Layer Discovery Protocol... Full Story

  • What it actually does When you run diagnose fdsm... Full Story

  • Monkey Bites are bite-sized, high-impact security insights designed for... Full Story

  • I have run macOS in macOS with Parallels but... Full Story

  • Don't be confused with my other FortiNAC posts where... Full Story

  • This is the third session in a multi-part article... Full Story

  • Today I was configuring key-based authentication on a FortiGate... Full Story

  • Netcat, often called the "Swiss Army knife" of networking,... Full Story

  • At its core, IEEE 802.1X is a network layer... Full Story

  • In case you did not see the previous FortiNAC... Full Story

  • This is our 5th session where we are going... Full Story

  • Now that we have Wireshark installed and somewhat configured,... Full Story

  • The Philosophy of Packet Analysis Troubleshooting isn't about looking... Full Story

  • If you have ever dug through a drawer full... Full Story

  • In this article, I will cover the basic AC... Full Story

  • OSPF (Open Shortest Path First) is a link-state IGP... Full Story