Site Tools


forward-basic

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
forward-basic [2023/10/26 15:32] – [PAT] -formatting hogwildforward-basic [2023/10/26 17:27] (current) – [Advanced Scenarios] -condense hogwild
Line 3: Line 3:
 When traffic is initiated from the Internet towards FreshTomato's WAN IP on a specific port, it is either answered by FreshTomato (if a service is enabled for the port) or dropped. However, in some situations, you'll want WAN port traffic always redirected to a specific LAN IP address/port. This can be helpful for applications such an internal web/mail server, gaming, VoIP or certain VPN tunnelling protocols. The Basic Port Forwarding menu allows you to do this. When traffic is initiated from the Internet towards FreshTomato's WAN IP on a specific port, it is either answered by FreshTomato (if a service is enabled for the port) or dropped. However, in some situations, you'll want WAN port traffic always redirected to a specific LAN IP address/port. This can be helpful for applications such an internal web/mail server, gaming, VoIP or certain VPN tunnelling protocols. The Basic Port Forwarding menu allows you to do this.
  
- \\ + \\ 
 ==== NAT ==== ==== NAT ====
  
Line 10: Line 11:
 Connections initiated on the Internet will not reach a LAN IP address, as the PAT (Port Address Translation) table doesn't contain references to those connection attempts. By coincidence, this acts as minimal security feature. Connections initiated on the Internet will not reach a LAN IP address, as the PAT (Port Address Translation) table doesn't contain references to those connection attempts. By coincidence, this acts as minimal security feature.
  
- \\ + \\ 
 ==== PAT ==== ==== PAT ====
  
Line 37: Line 39:
  \\  \\
  
-**Src Address**: (Optional). This will restrict the rule so it's applied only from specific source addresses. Contrary to its name, DNS hostnames and FQDN names are both valid here. Leaving this empty configures port forwarding to be "from any address".+**Src Address**: (Optional). This will restrict the rule so it's applied only from specific source addresses. DNS hostnamesFQDN names and IP addresses are all valid here. Leaving this empty configures port forwarding to be "from any address".
  
 **Ext Port:** This defines a mapping to the (external) port the Internet connection expects to use. It can be a single port or a range, with syntax: "FromPort-ToPort". **Ext Port:** This defines a mapping to the (external) port the Internet connection expects to use. It can be a single port or a range, with syntax: "FromPort-ToPort".
  
-**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 Port:** (Optional). Here, you can 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:** This specifies the internal Address to which the port on the LAN the traffic should be redirected.+**Int Address:** This specifies the internal address to which the port on the LAN the traffic should be redirected.
  
 **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 "RDP" or "Mail Server". **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 "RDP" or "Mail Server".
Line 53: Line 55:
 ==== Advanced Scenarios ==== ==== Advanced Scenarios ====
  
-As we know, only one given socket (port/protocol combination) can be forwarded at any given time. For example, if port 80 is already redirected to 192.168.1.10, this port is now "taken" from the router's pool and all inbound connections will be redirected to the mapped LAN IP address. However, there are two possible solutions to multiplex connectivity on the very same port.+As we know, only one given socket (port/protocol combination) can be forwarded at any given time. For example, if port 80 is already redirected to 192.168.1.10, this port is now "taken" from the router's pool and all inbound connections will be redirected to the mapped LAN IP address. However, there are two ways to allow you to multiplex connectivity on the same port.
  
 === Reverse Proxy === === Reverse Proxy ===
  
-By definitionproxy needs to speak the language (protocolused by the application to perform its job. For example, an HTTP proxy cannot serve SMTP. If you need to redirect, say HTTP to multiple internal hosts from the very same external port a reverse proxy is a good solution. HTTP v1.1 states that the target hostname must be included in the HTTP client request, this allows a proxy to fetch such info and redirect according to the requested domain. Nginx (not covered in this article) is able to perform this so called reverse-proxy for HTTP/HTTPS+In order to perform its jobproxy must speak the protocol used by the application. For example, an HTTP proxy cannot serve SMTP.  If you needed to redirect, say,  HTTP to multiple internal hosts from the same external porta reverse proxy is a good solution. According to HTTP v1.1the target hostname must be included in the HTTP client request. This allows a proxy to fetch such information, and redirect it according to the requested domain. Nginx is able to perform this so-called reverse-proxy for HTTP/HTTPS.
  
-=== 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:protocol as long as the source is defined differently.  This will work just fine: {{:pasted:20231026-084901.png?750}}+If the source IP and/or FQDN is well-knownyou can create multiple port mapping references on the same port:protocol combination as long as the source is defined differently.  The following settings would work fine:
  
-and result into traffic from source.example.com (whichever IP address/es this resolves to) to port 80 and 443 being redirected to specific LAN IP where any other source on such ports will be redirected to a different LAN IP address.+ \\ 
 + 
 + {{:pasted:20231026-084901.png?750}} 
 + 
 + \\ 
 + 
 +The settings above would cause traffic from the IP address(es) of "source.example.com" towards ports 80 and 443 on the router, to be redirected to the specific LAN address in that rule. They would also cause traffic on such ports that was //not// from source.example.com to be redirected to a different LAN IP address. 
 + 
 + \\
  
  
forward-basic.1698330760.txt.gz · Last modified: 2023/10/26 15:32 by hogwild