This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| forward-basic [2023/10/26 15:31] – [Advanced scenarios] -clarity, grammar hogwild | forward-basic [2025/08/23 16:57] (current) – [PAT] -Resize Gateway option screenshot to 281 hogwild | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Port Forwarding - Basic ====== | ====== Port Forwarding - Basic ====== | ||
| - | When traffic is initiated from the Internet | + | When traffic is initiated from the Internet |
| + | |||
| + | However, in some situations, you'll want WAN port traffic redirected to a specific LAN IP address/ | ||
| + | |||
| + | \\ | ||
| ==== NAT ==== | ==== NAT ==== | ||
| - | NAT (Network Address Translation) is a feature which allows multiple LAN clients with private (non-routable) IP addresses to connect to the Internet via a single public IP address. NAT re-addresses outgoing packets to the Internet from private LAN clients with FreshTomato' | + | Network Address Translation allows multiple LAN clients with private (non-routable) IP addresses to connect to the Internet via a single public IP address. |
| + | |||
| + | NAT re-addresses outgoing packets to the Internet from private LAN clients with FreshTomato' | ||
| + | |||
| + | NAT takes traffic from network 1 and makes it appear on network 2 as if it's coming from the router IP address on network 2. The store of address mappings and open/closed connections is called the NAT Table. | ||
| + | |||
| + | Connections initiated via the Internet won't reach a LAN IP address, as the PAT (Port Address Translation) table doesn' | ||
| + | |||
| + | \\ | ||
| - | Connections initiated on the Internet will not reach a LAN IP address, as the PAT (Port Address Translation) table doesn' | ||
| ==== PAT ==== | ==== PAT ==== | ||
| - | There are several types of NAT. The most common | + | There are several types of NAT. The most common/relevant |
| - | NOTE: There is an obsolete setting in the Miscellaneous section of some older versions in of the // | + | Note that there' |
| \\ | \\ | ||
| - | [[https:// | + | [[https:// |
| \\ | \\ | ||
| - | **On: | + | **On: |
| - | **Protocol: | + | \\ |
| + | |||
| + | **Protocol: | ||
| * UDP - only UDP connections are forwarded | * UDP - only UDP connections are forwarded | ||
| Line 31: | Line 45: | ||
| \\ | \\ | ||
| - | [[https:// | + | [[https:// |
| \\ | \\ | ||
| - | **Src Address**: | + | **Src Address**: |
| - | **Ext Port:** This defines a mapping to the (external) port the Internet connection expects to use. It can be a single | + | DNS hostnames, FQDN names and IP addresses are valid here. Leaving this empty configures |
| - | **Int Port:** (Optional). Here, you can specify a different (internal) port to the target LAN IP address. Leaving this empty uses the same port as the Ext Port \\ (Default: empty). | + | \\ |
| - | **Int Address:** This specifies the internal Address | + | **Ext Port:** defines a mapping |
| - | **Description:** Here, enter any text to help you remember the reason for the mapping. Most users enter the application name, or protocol used, such as " | + | This can be a single port/range, with syntax: "FromPort-ToPort". |
| \\ | \\ | ||
| + | |||
| + | **Int Port:** this lets you specify a different (internal) port for the target LAN IP address. | ||
| + | |||
| + | Leaving this empty uses the same port as the Ext Port setting (Default: empty). | ||
| \\ | \\ | ||
| + | |||
| + | **Int Address:** specifies the internal address to which the port on the LAN the traffic should be redirected. | ||
| + | |||
| + | \\ | ||
| + | |||
| + | **Description: | ||
| + | |||
| + | Most users enter the application name or protocol used. For example: " | ||
| + | |||
| + | \\ | ||
| + | |||
| + | \\ | ||
| + | |||
| ==== Advanced Scenarios ==== | ==== Advanced Scenarios ==== | ||
| - | As we know, only one given socket (port/ | + | Only one given socket (port/ |
| === Reverse Proxy === | === Reverse Proxy === | ||
| - | By definition, A proxy needs to speak the language (protocol) used by the application | + | To do its job, a proxy must speak the protocol used by the application. For example, an HTTP proxy cannot serve SMTP. If you need to redirect, say, |
| - | === source bound redirection | + | === Source Bound Redirection |
| + | |||
| + | If the source IP and/or FQDN is well-known, you can create multiple port mapping references on the same port: | ||
| + | |||
| + | \\ | ||
| + | |||
| + | {{:: | ||
| + | |||
| + | The above settings would cause traffic from the IP addresses of " | ||
| + | |||
| + | \\ | ||
| + | |||
| + | Note that the "Src. Address" | ||
| + | |||
| + | \\ | ||
| - | If the source IP and/or FQDN is well known you can create multiple port mapping references on the same port: | + | ^ On ^ Protocol |
| + | | ⭐ | TCP | | 80,443 | | 192.168.1.5 | Main webserver | | ||
| + | | ⭐ | TCP | source1.example.com | 80,443 | | 192.168.1.6 | Second webserver | | ||
| + | | ⭐ | TCP | source2.example.com | 80,443 | | 192.168.1.6 | Second webserver | | ||
| - | and result into traffic from source.example.com (whichever IP address/es this resolves to) to port 80 and 443 being redirected to a specific LAN IP where any other source on such ports will be redirected to a different LAN IP address. | + | \\ \\ |