Creating a Port-Forward Rule - The IPFire Documentation (2024)

Setting up port-forwarding is a very common task. This guide explains how to set up a port-forwarding rule really quickly. Please checkout out the firewall rules reference for further description.

Technical Background

A port-forward is another term for a Destination NAT. Packets that are received by the firewall can be transparently forwarded to a new destination. Setting up a port-forwarding rule requires an originating source and new destination to be specified, with optional protocol constraints to further refine the rule.

Rule Creation

To create a new port-forwarding rule, select >> Firewall >> Firewall Rules and press the "New rule" button. Source and destination ports can only be defined for protocols that uses ports, i.e. TCP or UDP.

Step 1: Source

Define the source from which the service you are forwarding to is accessible. Usually, you do not need to specify anything other than the defaults. Where practical, limit the possible source(s) by selecting a host, group of hosts or specific network.

Choose the following to forward a WAN / RED port to a single internal server.

  • Standard Networks: Any or RED

Step 2: NAT

As this is a NAT rule, check "Use Network Address Translation (NAT)" and select "Destination NAT (Port forwarding)".

If you have public IP address space in the destination zone, you don't need to check the NAT checkbox, but make sure to select ACCEPT as rule action further down below.

Choose the following to forward a WAN / RED port to a single internal server.

  • Use Network Address Translation(NAT)
  • Destination Nat(Port Forwarding)
  • Firewall Interface = Automatic

Step 3: Destination

Now, you will need to pick the server to which you are going to forward packets to. You can either select it from the dropdown boxes or enter the IP address directly. Note, that the system must be part of a local network that is reachable from the firewall.

Choose the following to forward a WAN / RED port to a single internal server.

  • Destination address (IP address or network) = Set to the address of the target computer/server.

Step 4: Protocol

You will want to pick one or more services that you will forward to the server you just choose, but never select "All" here.

Use a preset if you cannot remember the port number or select a protocol from the dropdown menu and enter the destination port you need. If you want to use a different port externally, you may enter it in "External port (NAT)" or leave it empty.

Choose the following to forward a WAN / RED port to a single internal server.

  • Choose a protocol, TCP, UDP are the most common.
  • Source port: = Blank, This is the port the client was using to talk to you.
  • Destination port: = The port the server is listening to.
  • External port (NAT): The port number the rest of the world will talk to, normally "Blank" for the same port as Destination port.

Step 5: Done

We are almost done - don't forget to add a descriptive remark.

Optionally, you may specify at which time the rule is active only. See Creating Firewall Rules (reference) for all about this feature.

Congratulations. You finally set up your port-forwarding!

Creating a Port-Forward Rule - The IPFire Documentation (1)

Creating a Port-Forward Rule - The IPFire Documentation (2)

Examples

Notes

This is also for what is known as HairPin NAT or Loopback NAT, where you are working from inside your LAN, but addressing a resource inside your LAN through the external IP address.

Creating a Port-Forward Rule - The IPFire Documentation (2024)

FAQs

Creating a Port-Forward Rule - The IPFire Documentation? ›

To create a new port-forwarding rule, select >> Firewall >> Firewall Rules and press the "New rule" button. Source and destination ports can only be defined for protocols that uses ports, i.e. TCP or UDP.

What is the forwarding rule of a firewall? ›

One of the ways that you can allow inbound connections to access your network is port forwarding. Port forwarding rules, also known as inbound firewall rules, check the header of each inbound data packet and either block or forward each packet to the specified devices on your local network.

What to put in destination IP for port forwarding? ›

Destination: The IP address where the traffic to be forwarded is initially destined. For port forwards on WAN, in most cases this is WAN Address. Where multiple public IP addresses are available, it may be a Virtual IP (see Virtual IP Addresses) on WAN.

What is the access port for Ipfire? ›

By default, the web interface is at https://ipfire.localdomain:444 or https://ipfire:444. If you used a different hostname or domain, you will have to use that, or you can simply access it via the IP address (e.g. https://192.168.60.1:444 ).

What is an example of port forwarding? ›

Local Port Forwarding

For example, suppose a user wants to access a web server (port 80) located on a remote server with IP address 192.168. 1.100, but direct access to port 80 is blocked. The user can use local port forwarding to redirect local port 8080 to the remote server's port 80.

Do I need a static IP address for port forwarding? ›

Any port forwarding configuration you make on your router needs to be fixed to a certain IP address, so it's important that it doesn't change. That's why we walk you through the steps of configuring a Static IP address.

What is the difference between port forwarding and port triggering? ›

Port forwarding opens the specified data ports all the time and devices must use static IP addresses. Port trigger only opens the incoming port when a LAN device requests access to the trigger port. Unlike port forwarding, port trigger does not require static IP addresses for LAN devices.

What OS is IPFire based on? ›

IPFire - The Operating System

It is based on Linux but unlike a stock distribution like Debian or Fedora, IPFire is hardened and optimised for use as a firewall. Each component and software package that is being used is selected by the developers and built from its sources.

How does IPFire work? ›

IPFire employs a Stateful Packet Inspection (SPI) firewall. That means that the firewall internally stores information about every connection and is then able to associate every packet that transits the firewall to the connection it belongs to.

How secure is IPFire? ›

IPFire is designed to be secure by default, however it can be further hardened so that it is even more difficult to attack. Hardening includes; Good Security Practice. Additional Security Configuration.

Why do I have a port forwarding rule? ›

Port forwarding, also known as port management, allows remote servers and devices on the internet to be able to access devices that are on a private network. If you are not using port forwarding, only devices on that private internal network can have access to each other or your network.

How do I know what port to use for port forwarding? ›

You do this by finding the IP address of the computer running your website and setting a rule to forward all traffic on port 80 to that IP address. You can also specify the port you forward the data to. For example, if you run the website on port 8080, you can forward it to that port.

Top Articles
Latest Posts
Article information

Author: Frankie Dare

Last Updated:

Views: 5831

Rating: 4.2 / 5 (53 voted)

Reviews: 84% of readers found this page helpful

Author information

Name: Frankie Dare

Birthday: 2000-01-27

Address: Suite 313 45115 Caridad Freeway, Port Barabaraville, MS 66713

Phone: +3769542039359

Job: Sales Manager

Hobby: Baton twirling, Stand-up comedy, Leather crafting, Rugby, tabletop games, Jigsaw puzzles, Air sports

Introduction: My name is Frankie Dare, I am a funny, beautiful, proud, fair, pleasant, cheerful, enthusiastic person who loves writing and wants to share my knowledge and understanding with you.