This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| advanced-firewall [2026/09/30 12:59] – [NAT] rs232 | advanced-firewall [2026/11/10 22:42] (current) – [NAT] -Condense, format NAT loopback table contents hogwild | ||
|---|---|---|---|
| Line 54: | Line 54: | ||
| ===== NAT ===== | ===== NAT ===== | ||
| - | **NAT loopback: | + | **NAT loopback:** NAT Loopback (Hairpinning) logic is implemented in the firewall subsystem using iptables rules. These rules are applied to the PREROUTING and POSTROUTING |
| - | \\ | + | This table explains the options availabe for NAT loopback: |
| - | 1. Disabled | + | \\ |
| - | Under the Hood (iptables): FreshTomato omits loopback rules in the NAT chains. | + | |
| - | \\ | + | ^ Mode ^ |
| - | + | | **All** | Any LAN traffic sent to the router’s WAN IP is looped back to the router or LAN destination, | |
| - | Behavior: When a local LAN client sends traffic destined for the router’s public WAN IP address (or DDNS domain | + | | **Forwarded Only** (default) | Loopback translation applies only to LAN traffic targeting WAN-IP ports that have explicit Port Forwarding rules. Other WAN-IP ports are rejected or dropped. | Provides security and control by preventing LAN access to non-forwarded portsLimits loopback processing to only the required ports, improving efficiency. | Does not work for dynamic or non-forwarded services, such as UPnP-opened ports or some DMZ configurations; |
| + | | **Disabled** | No loopback NAT rules are added.LAN traffic destined for the router’s public WAN IP or DDNS name is dropped or rejected. | Creates the lowest CPU load and maximum throughput because | ||
| \\ | \\ | ||
| - | Pros: | + | * < |
| - | - Lowest router CPU load and max throughput | + | |
| - | - Forces proper network boundary segregation. | + | |
| - | \\ | + | * < |
| - | + | | |
| - | Cons: | + | * < |
| - | - LAN devices cannot access local servers using public domain names or public IP addresses nor the router admin interface on the WAN. | + | |
| - | + | ||
| - | \\ | + | |
| - | \\ | + | |
| - | + | ||
| - | 2. Forwarded Only (default) \\ | + | |
| - | + | ||
| - | Under the Hood (iptables): FreshTomato | + | |
| - | + | ||
| - | \\ | + | |
| - | + | ||
| - | Matches | + | |
| - | + | ||
| - | \\ | + | |
| - | + | ||
| - | Behavior: If you forward port 8443 to an internal server at 192.168.1.10: | + | |
| - | + | ||
| - | \\ | + | |
| - | + | ||
| - | Pros: | + | |
| - | - Security & Control: Prevents | + | |
| - | - Performance: | + | |
| - | + | ||
| - | \\ | + | |
| - | + | ||
| - | Cons: | + | |
| - | - Will not work for dynamic | + | |
| - | + | ||
| - | \\ | + | |
| - | \\ | + | |
| - | + | ||
| - | 3. All \\ | + | |
| - | + | ||
| - | Under the Hood (iptables): FreshTomato | + | |
| - | + | ||
| - | \\ | + | |
| - | + | ||
| - | Behavior: | + | |
| - | + | ||
| - | \\ | + | |
| - | + | ||
| - | Pros: | + | |
| - | - "It just works" convenience—applies to UPnP mapped ports, DMZ hosts, | + | |
| - | + | ||
| - | \\ | + | |
| - | + | ||
| - | Cons: | + | |
| - | - Performance Bottlenecks (minor): Every single piece of LAN-to-" | + | |
| - | - Unintended Loops/ | + | |
| - | + | ||
| - | \\ | + | |
| {{:: | {{:: | ||
| Line 133: | Line 80: | ||
| Masquerade is the default, but involves an additional lookup, and the mapping is done towards an interface. SNAT is minutely faster, as its NAT mapping points directly to the destination IP, thus bypassing the lookup stage. However, SNAT is less reliable than Masquerade.\\ | Masquerade is the default, but involves an additional lookup, and the mapping is done towards an interface. SNAT is minutely faster, as its NAT mapping points directly to the destination IP, thus bypassing the lookup stage. However, SNAT is less reliable than Masquerade.\\ | ||
| + | |||
| ===== Multicast ===== | ===== Multicast ===== | ||