Hi, im trying to open port 5000 on wan but its not working. ISP delegated ipv6 prefix is getting allocated to respective hosts.
since the ip address is dynamic, i have created a firewall rule with destination address represented in negative netmask notation. Also for dhcp lease, i have a static suffix 200 added against the host and the same is getting allocated every time.
firewall rule is as below:
config rule
option dest_port '5000'
option src 'wan'
option name 'test'
option target 'ACCEPT'
option family 'ipv6'
option dest 'lan'
list proto 'tcp'
list dest_ip '::200/-16'
if i hard code the complete ipv6 address of the host in the above rule, its working fine though. please help
i restarted the wan interface. both prefix and suffix for the host got changed completely except the last 16 bits of suffix which i have added in static dhcp config.
it seems this whole host based config for ipv6 is broken, given i cant configure a 64 bit suffix for static lease.
thanks, for now, i ll isolate the host and add zone based rule like below. hope it respects zone config.
config rule
option dest_port '5000'
option src 'wan'
option name 'test'
option target 'ACCEPT'
option family 'ipv6'
option dest 'app_server'
list proto 'tcp'
of course we need to set static suffix but the problem is you can set only the last 16 bits of the suffix in static config and the firewall rule needs the complete 128bit address or the 64bit suffix.
when the prefix changes, say on router reboot. the suffix also changes except the last 16 bits which will make the firewall rule useless.
Sounds like you are doing something wrong as the suffix must not depend on the prefix.
Even if hostid is limited, other bits must remain zero, except for ip6hint which can vary.
But ip6hint only matters for multiple interfaces and it can also be configured statically.
thanks, this configuration seems to be the issue. i thought its only for the interface. if i remove random, it will always allocate ::xxx suffix to all the hosts. this should solve my issue even though the first 48 bits of suffix is always zero or is there a way to configure it as well?
The suffix is empty by default and that should be for a reason.
It would be better to let the hosts decide for themselves what suffix to use.
Modern client OS can automatically apply randomization when required.
i do agree with you. there is this one host that i need to expose on wan and i didnt have a choice. i got this host based rule working now as expected. thanks a lot