0
I've just stumbled upon a funny custom service definition:
edit "cust_serv"
set protocol TCP
set tcp-portrange 0
next
What does tcp-portrange 0 have for a meaning to the Fortigate?
0
I've just stumbled upon a funny custom service definition:
edit "cust_serv"
set protocol TCP
set tcp-portrange 0
next
What does tcp-portrange 0 have for a meaning to the Fortigate?
1
set tcp-portrange 0
is specific for FortiOS and denotes 'any' port. FortiOS often uses the single zero as a token for 'any'.
0
That declaration is incorrect. the "portrange" syntax requires a range, as in something like set tcp portrange 100-200
. TCP port 0 is categorized as "Reserved" according to the IANA specifications. You can define rules that would match port 0, but I know of no services that would use port 0.
I know the IANA specifications. I was rather wondering if that is a short-cut or has a special meaning for Fortigate Firewalls, after all it's their configuration file. – user857990 – 2013-07-15T13:39:15.117
In all honesty, I didn't know any specifics of the type of firewall you were using. I read the docs from their website:
http://docs.fortinet.com/fgt/handbook/cli_html/index.html#page/FortiOS%205.0%20CLI/config_firewall.10.32.html
But there is very little info to be found there. It looks very similar to a
lib-pcap
filter specification, which would probably just ignore the invalid declaration. Perhaps the specification is invalid and just meant to give you an idea of the structure.