Hi!
I am have a 24 port switch, all port bridged.
On port 1 I have the internet connection (pppoe)
I have a single nat rule:
0 chain=srcnat action=masquerade out-interface=pppoe-out1 log=no
log-prefix=“”
So I have internet connection.
I have a hikvision DVR.
I have a port forward rule:
1 chain=dstnat action=dst-nat to-addresses=192.168.10.189 protocol=tcp
in-interface=pppoe-out1 dst-port=8000,8001 log=no log-prefix=“”
I have capsman service with 3 CAP, same subnet 192.168.10.0/24
I have turned on IP:CLOUD and I have set it up under my domain name as a CNAME record.
I can access to the DRV from 4G, but I cannot access to it from LAN by using the cname subdomain record. I know its because of the bad firewall rule.
If I am trying to copy make the first rule, I am getting error at add chain srcnat part. If I remove the last part of the rule I am getting: value of range expects range of ip addresses .
Put your Cloud Domain name in as a firewall address entry call it ‘mywanip’
In the DST Nat rule, Use destination-address-list=mywanip (and not in-interface=)
chain=dstnat action=dst-nat protocol=tcp dst-address-list=mywanip
dst-port=8000,8002 to-addresses=192.168.10.189
Keep your original masquerade rule but you need one more the hairpin masquerade rule.
chain=srcnat action=masquerade out-interface=pppoe-out1 log=no
but above this put the the required additional one
chain=srcnat src-address=192.168.10.0/24 dst-address=192.168.10.0/24
…
No I dont think it will help and in fact probably gets in the way (but who knows I have been wrong before…)
(1) The additional masquerade rule is correct
(2) However in the destination nat rule, is not correct.
There is no requirement to identify the in-interface as far as I know, and in fact it is replaced by (depending upon which of 3 possible solutions for dynamic IP are selected) different versions of dst-nat, NONE of them including in-interface=pppoe-out1
(3) Further, it is not clear what the heck you are referring to by dst-address=DWANIP??? There is no IP address I am aware of that looks like that???
So if you note on my previous post you referring to a dst-address**-list** which points to a firewall address list entry!!!
Yes but its not in the right format. INCORRECT dst-address=firewall_address_list_name CORRECT dst-address**-list**=firewall_address_list_name (this is in addition to removing the in-interface=, as its not required)