1
Tutorials and FAQs / Re: Firewall | 1:1 / One-to-One NAT single IPs for multiple public single IPs
« on: August 28, 2023, 06:43:55 pm »
Hello
here is my configuration that my help others to setup 1:1 / On-to-On NAT with single IPs for multipe public single IPs
here is basic network layout as mentionded above:
Network-Layout
1:1 IP mapping
OPNsense Configuration | Interfaces:
OPNsense Configuration | Interfaces | Virtual IPs:
OPNsense Configuration | Firewall | One-to-One: (I found that aliases do not work )
OPNsense Configuration | Firewall | Rules | WAN (Interface):
or if some only specific port ranges should be 1:1 forwarded (again Aliases for the DMZ IP address seems not to work):
for any other protocol types together with a TCP/UDP port range additional rules have to added:
best regards
here is my configuration that my help others to setup 1:1 / On-to-On NAT with single IPs for multipe public single IPs
here is basic network layout as mentionded above:
Network-Layout
Code: [Select]
WAN | xxx.yyy.zzz.240/29 public subnet, xxx.yyy.zzz.241 router, xxx.yyy.zzz.242 OPNsense WAN
DMZ | 192.168.5.0/24
LAN | 192.168.1.0/24
1:1 IP mapping
Code: [Select]
WAN | xxx.yyy.zzz.244 -> DMZ | 192.168.5.10/24
WAN | xxx.yyy.zzz.245 -> DMZ | 192.168.5.11/24
OPNsense Configuration | Interfaces:
Code: [Select]
interface WAN | IP xxx.yyy.zzz.242/29, gateway autodetect
interface DMZ | IP 192.168.5.1/24, gateway autodetect
interface LAN | 192.168.1.1/24, gateway autodetect
OPNsense Configuration | Interfaces | Virtual IPs:
Code: [Select]
interfaces virtual IP | xxx.yyy.zzz.244/32, if: WAN, type: Proxy ARP
interfaces virtual IP | xxx.yyy.zzz.245/32, if: WAN, type: Proxy ARP
OPNsense Configuration | Firewall | One-to-One: (I found that aliases do not work )
Code: [Select]
firewall one-to-one | if: WAN, ex IP: xxx.yyy.zzz.244/32, in IP - single Host/Network: 192.168.5.10/32, dest: any, type: binat, nat reflection: enable
firewall one-to-one | if: WAN, ex IP: xxx.yyy.zzz.245/32, in IP - single Host/Network: 192.168.5.11/32, dest: any, type: binat, nat reflection: enable
OPNsense Configuration | Firewall | Rules | WAN (Interface):
Code: [Select]
firewall rules wan | action: Pass, quick: enabled, if: WAN, direction: in, protocol: any, source: any, destination: any, gateway: default
or if some only specific port ranges should be 1:1 forwarded (again Aliases for the DMZ IP address seems not to work):
Code: [Select]
firewall rules WAN | action: Pass, quick: enabled, if: WAN, direction: in, protocol: TCP/UDP, source: any, destination - single host network: 192.168.5.10/32, destination port range: 443 (for https), gateway: default
firewall rules WAN | action: Pass, quick: enabled, if: WAN, direction: in, protocol: TCP/UDP, source: any, destination - single host network: 192.168.5.11/32, destination port range: 80 (for http or Alias with multiple ports), gateway: default
for any other protocol types together with a TCP/UDP port range additional rules have to added:
Code: [Select]
firewall rules WAN | action: Pass, quick: enabled, if: WAN, direction: in, protocol: ICMP, source: any, destination - single host network: 192.168.5.10/32, gateway: default
best regards