/ip/firewall/nat
add chain=dstnat action=dst-nat protocol=tcp dst-port=9999 to-addresses=8.8.8.8
add chain=srcnat action=masquerade protocol=tcp dst-port=9999 dst-address=8.8.8.8
add action=dst-nat chain=dstnat comment=ViberWebHook dst-port=9999 log=yes protocol=tcp to-addresses=8.8.8.8
add action=masquerade chain=srcnat comment=ViberWebHook dst-address=8.8.8.8 dst-port=9999 log=yes protocol=tcp to-addresses=8.8.8.8
is different from what you reported trying:/ip/firewall/nat
add chain=dstnat action=dst-nat protocol=tcp dst-port=9999 to-addresses=8.8.8.8
add chain=srcnat action=masquerade protocol=tcp dst-port=9999 dst-address=8.8.8.8
add action=dst-nat chain=dstnat comment=ViberWebHook dst-port=9999 log=yes protocol=tcp to-addresses=8.8.8.8
add action=masquerade chain=srcnat comment=ViberWebHook dst-address=8.8.8.8 dst-port=9999 log=yes protocol=tcp to-addresses=8.8.8.8
19 ;;; ViberWebHook
chain=dstnat action=netmap to-addresses=8.8.8.8 protocol=tcp in-interface=ether1 dst-port=9999 log=no log-prefix=""
20 chain=srcnat action=masquerade protocol=tcp dst-address=8.8.8.8 dst-port=9999 log=no log-prefix=""
1 ;;; NAT
chain=srcnat action=src-nat to-addresses=public_ip src-address=192.168.1.0/24 out-interface=ether1 log=no log-prefix=""
I've add rules beforeWhat Firewall Filter rules do you have? Have you allowed for a Forward from/to external interface?
forward chain hited no trafic on input.68 ;;; ViberWebHook
chain=input action=accept protocol=tcp dst-port=9999 log=no log-prefix=""
69 ;;; ViberWebHook
chain=forward action=accept protocol=tcp dst-port=9999 log=no log-prefix=""
its production config it has many rules on it i can't post it here so you can give advice what i can i check and what can be affected on that issue ...The point being, the OP should have provided his complete config on the first post........................
Another waste of a chasing thread because there is no first post process....... thankyou MT.
- works direct connectiondstnat: in:ether1-gateway out:(unknown 0), src-mac 00:xx:xx:xx:xx:22, proto TCP (SYN), somepublicip:50916->8.8.8.8:9999, len 60
doesnt work thrue remote server via mascaradedstnat: in:ether1-gateway out:(unknown 0), src-mac 00:xx:xx:xx:xx:22, proto TCP (SYN), 128.128.128.128:50926->8.8.8.8:9999, len 60
srcnat: in:(unknown 0) out:ether1, src-mac 06:yy:yy:yy:yy:3f, proto TCP (SYN), omepublicip:51394->8.8.8.8:9999, NAT omepublicip:51394->(128.128.128.128:9999->8.8.8.8:9999), len 60
8.8.8.8 side with redirected web serverip firewall filter
chain=forward action=accept protocol=tcp src-address=8.8.8.8 in-interface=ether1 src-port=9999 log=no log-prefix=""
chain=forward action=accept protocol=tcp in-interface=ether1 dst-port=9999 log=no log-prefix=""
ip firewall nat
chain=dstnat action=netmap to-addresses=8.8.8.8 to-ports=9999 protocol=tcp in-interface=ether1 dst-port=9999 log=no log-prefix=""
chain=srcnat action=masquerade protocol=tcp dst-address=8.8.8.8 dst-port=9999 log=no log-prefix=""
And everething works with signed ssl certificate for ip 128.128.128.128 and domain abcabc.com for that ip but internaly i redirected to other web server with public ip 8.8.8.8 with internal redirection to local ipip firewall filter
chain=forward action=accept protocol=tcp dst-port=9999 log=no log-prefix=""
ip firewall nat
chain=dstnat action=netmap to-addresses=10.10.0.254 to-ports=9999 protocol=tcp in-interface=ether1-gateway
dst-port=9999 log=no log-prefix=""