Howto: Fortinet Port Forwarding

**This is a legacy article which does not meet some of our quality standards. While it may contain useful information, is retained here for legacy reasons only.

There are different ways to set up Fortinet port forwarding, (using a DMZ for example), this article covers off the most basic example and can be applied to a DMZ setup later.

  1. Create a VIP first
  2. Go to firewall objects tab, virtual IP / Virtual IP
  3. Click create new
  4. Name: <Name of server you’re forwarding to>
  5. External Interface <Your external interface (in my case Chorus UFB)
  6. Type Static NAT
  7. External IP / Address Range: The IP address of your WAN supplied by your ISP (In both boxes if you only have one IP)
  8. Mapped IP / Address Range: The internal address of the server you’re forwarding to in the first box (the second box should auto populate).
  9. Port Forwarding: Leave unticked
  10. Second create a policy in your firewall
  11. On the policy tab, choose policy / policy
  12. Click Create New
  13. Source Interface / Zone (Your WAN connection) in my case Chorus UFB
  14. Source Address All
  15. Destination Address: <The Name you just gave your VIP connection>
  16. Schedule Always
  17. Service: Any single or multiple service that you wish to be forwarded to this IP address internally.
  18. You must enable NAT (although fortinet says you shouldn’t but I can’t get it to work otherwise).
  19. Do enable any logs, utm, shaping etc as you wish. (suggest a specific UTM profile for the specific ports that are opened in order to improve performance i.e. protect web, protect ssh etc.s

From the fortinet support page:

Test destination NAT by browsing to from the Internet. The session passes through the FortiGate unit to the web server which sends a response. Use the following packet sniffer command to see the results.

diagnose sniffer packet any ‘port 80’ 4 4


filters=[port 80]

6.150356 wan1 in -> syn 15893888

6.150637 internal out -> syn 15893888

6.150803 internal in -> syn 553485227 ack 15893889

6.150974 wan1 out -> syn 553485227 ack 15893889

The first output line shows a packet from a client device with IP address was received by the wan1 interface with destination address and destination port 80.

The second output line shows that when the packet exits the internal interface the destination address is changed to and the destination port is still 80.

The third output line shows the response from the web server.

The fourth output line shows the response from the web server being returned to the client device. The source address has been changed back to

In this example, the source port is not changed.

Go to Policy > Policy > Policy and check the Count column for the security policy you added to verify that it is processing traffic.

Go to Policy > Monitor > Session Monitor to view the sessions being processed by the FortiGate unit. You can also see results by going to Policy > Monitor > Policy Monitor to view a graph of active sessions for each policy. Since there is only one policy, that graph contains only one entry. You can select the bar graph for the policy to view the top sessions by source address, destination address, or destination port/service.

The Top Sessions dashboard widget presents another view of sessions that you can also drill down into to get more info about current sessions. Other dashboard widgets display session history, traffic history, and per-IP bandwidth usage.

[td_block_21 modules_on_row="" modules_gap="" image_width="28" image_floated="float_left" meta_padding="0" image_radius="8" image_height="70" meta_info_horiz="" modules_category="" modules_category_margin="-1px 10px 0 0" show_excerpt="none" show_btn="none" show_com="none" show_author="none" show_cat="" image_size="td_324x400" block_template_id="" f_title_font_line_height="eyJhbGwiOiIxLjIiLCJwb3J0cmFpdCI6IjEuMSIsImxhbmRzY2FwZSI6IjEuMSIsInBob25lIjoiMS4xIn0=" f_title_font_family="406" f_title_font_size="eyJhbGwiOiIxOCIsImxhbmRzY2FwZSI6IjE2IiwicG9ydHJhaXQiOiIxNCIsInBob25lIjoiMTYifQ==" f_title_font_weight="eyJhbGwiOiI4MDAiLCJwb3J0cmFpdCI6IjYwMCJ9" f_cat_font_size="eyJhbGwiOiIxMSIsImxhbmRzY2FwZSI6IjEwIiwicG9ydHJhaXQiOiI5IiwicGhvbmUiOiIxMCJ9" f_cat_font_weight="800" f_cat_font_family="406" f_cat_font_transform="uppercase" f_meta_font_size="eyJhbGwiOiIxMSIsImxhbmRzY2FwZSI6IjEwIiwicG9ydHJhaXQiOiI5IiwicGhvbmUiOiIxMCJ9" f_meta_font_transform="uppercase" f_meta_font_family="406" all_modules_space="eyJhbGwiOiI0MiIsImxhbmRzY2FwZSI6IjM0IiwicG9ydHJhaXQiOiIyNCIsInBob25lIjoiMzIifQ==" meta_info_align="center" art_title="eyJhbGwiOiIwIDAgMTJweCIsImxhbmRzY2FwZSI6IjAgMCA4cHgiLCJwb3J0cmFpdCI6IjAgMCA2cHgiLCJwaG9uZSI6IjAgMCA4cHgifQ==" modules_category_padding="3px 0 4px" cat_txt="#0d42a2" cat_bg="rgba(13,66,162,0)" f_meta_font_weight="800" tdc_css="eyJhbGwiOnsibWFyZ2luLXRvcCI6IjIwIiwibWFyZ2luLWJvdHRvbSI6IjAiLCJkaXNwbGF5IjoiIn0sInBob25lIjp7ImRpc3BsYXkiOiIifSwicGhvbmVfbWF4X3dpZHRoIjo3Njd9" hide_image="yes" modules_divider="solid" title_txt="#000000" related_articles_posts_limit="5" sort="popular" custom_title="Popular Articles"]

Related Stories

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Stay on op - Ge the daily news in your inbox