Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've just stumbled upon a funny custom service definition:

edit "cust_serv"
    set protocol TCP
    set tcp-portrange 0 

What does tcp-portrange 0 have for a meaning to the Fortigate?

share|improve this question
up vote 1 down vote accepted

set tcp-portrange 0 is specific for FortiOS and denotes 'any' port. FortiOS often uses the single zero as a token for 'any'.

share|improve this answer

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.

share|improve this answer
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 Jul 15 '13 at 13:39
In all honesty, I didn't know any specifics of the type of firewall you were using. I read the docs from their website:… 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. – TheCompWiz Jul 15 '13 at 13:48

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.