Home
Help
Search
Login
Register
OPNsense Forum
»
English Forums
»
General Discussion
»
DNAT+SNAT
« previous
next »
Print
Pages: [
1
]
Author
Topic: DNAT+SNAT (Read 1014 times)
HatalaTitla48
Newbie
Posts: 5
Karma: 0
DNAT+SNAT
«
on:
September 29, 2021, 11:16:18 pm »
I have group of intranet IPs 192.168.0.80-192.168.0.90. If pc with ip from this range make a request for WAN-IP address, it should be redirected to internal ip 192.168.0.20. With iptables, solution is this:
iptables -t nat -A PREROUTING -i $LAN_IF -m iprange --src-range 192.168.0.80-192.168.0.90 -p tcp -d $WAN_IP --dport 443 -j DNAT --to 192.168.0.20:443
iptables -t nat -A POSTROUTING -m iprange --src-range 192.168.0.80-192.168.0.90 -p tcp -d 192.168.0.20 --dport 443 -j SNAT --to-source $WAN_IP
How do I achive this with opnsense?
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
English Forums
»
General Discussion
»
DNAT+SNAT