Hello,
About Port Allocation settings into TS Agent Configuration, we are not sure about the field "Maximum Number of Port Alloc Ranges"!
Do you know what this field means exactly?
Does it mean the maximum number of separated ranges (of allocated ports) per users, or the maximum of users who can obtain a range of allocated ports?
Regards,
Christophe
Solved! Go to Solution.
Hello Christophe,
"Number of Port Per Allocation" - tells how many ports will be allocated per single user known to FSSO
"Maximum Number of Port Alloc Ranges" - tell how many of those ranges can be assigned per single user
Mechanisms:
- user log in and get some port range X (default 200 ports), and start to open connections, let's count them as N
- when N get closer to X, port pool almost exhausted, TSAgent allocate a new port range to user, let's say Y
- when N get closer to X+Y, new port range should be allocated, let say Z
- if TSAgent has default config which is 200 ports and max 2 ranges, then Z is not allocated as user already has X+Y ranges and reached max port alloc ranges limit. Otherwise Z is allocated and above mentioned alocation repeat till the user need more ports and hasn't reached max alloc range number.
- if user decrease his number of connections N below amount in X, then port range Y, now not used, is getting to be released and user will keep his initial range X
Hope it's a bit more clear, now.
xsilver
Tomas Stribrny - NASDAQ:FTNT - Fortinet Inc. - TAC Staff Engineer
AAA, MFA, VoIP and other Fortinet stuff
Hello Christophe,
"Number of Port Per Allocation" - tells how many ports will be allocated per single user known to FSSO
"Maximum Number of Port Alloc Ranges" - tell how many of those ranges can be assigned per single user
Mechanisms:
- user log in and get some port range X (default 200 ports), and start to open connections, let's count them as N
- when N get closer to X, port pool almost exhausted, TSAgent allocate a new port range to user, let's say Y
- when N get closer to X+Y, new port range should be allocated, let say Z
- if TSAgent has default config which is 200 ports and max 2 ranges, then Z is not allocated as user already has X+Y ranges and reached max port alloc ranges limit. Otherwise Z is allocated and above mentioned alocation repeat till the user need more ports and hasn't reached max alloc range number.
- if user decrease his number of connections N below amount in X, then port range Y, now not used, is getting to be released and user will keep his initial range X
Hope it's a bit more clear, now.
xsilver
Tomas Stribrny - NASDAQ:FTNT - Fortinet Inc. - TAC Staff Engineer
AAA, MFA, VoIP and other Fortinet stuff
Thanks a lot xsilver!
exactly .. ports (200) X max ranges (2) X number of users (25) = 200*2*25 = 10000
note that:
- not all users will consume all ports all the time
- ports are not allocated at user start but dynamically as user's apps need to open new connection
- if port consumption lower the port ranges are dynamically released from under user 'account'
- reallocated again if needed
Tomas Stribrny - NASDAQ:FTNT - Fortinet Inc. - TAC Staff Engineer
AAA, MFA, VoIP and other Fortinet stuff
Hi,
Thank you very much for your reply.
1) 10000 mean new of connection per user or for the 25 users.
2) Normally the port allocation will allocate to users even they are working internally or its only while access internet
3) How the port will release everyday like if a user allocate a port range number 1025-1026 in the morning and it will keep using the same range of port on the same day and next day he or she try to connect again it will allocate another new range like 1030-1031. can you please explain on this to me.
4) if am right the maximum port range 2 mean one user will not be able to allocate more than 2 port range. And if this is the case if he or she request another port number it will not be possible thus, session will not enter in the session table
Am asking you because my internet users can work fine for one day and the next day some users start complaining.
Thanks
Awaiting your reply
Hi,
1. equation mentioned and counted with users (25) , therefor 10000 ports is for all 25 users and maximum ports allocated (2 ranges per 200 = 400 ports each user)
2. no matter where is the user connecting to from the terminal server. If connection is TCP/UDP he needs port to be opened and therefore free port available within port ranges allocated to this user. If there is no available free port then user ask system to allocate new port range and if he haven't used all ranges yet, he will get new range (group of ports) allocated. If he already used all port ranges he will be rejected.
3. port allocation is done per session to terminal server. When user disconect, then all his port ranges are released. When he connects to terminal server next time, one new range is allocated. Additional ranges are allocated on demand basis if allowed by max port ranges limit.
If he log in and get 1025-1225 and need more then next range of 200 ports (default range is 200 ports) is alocated.
If he log out and log in again then one new port range is allocated from port ranges available to TSAgent. Not necessarily 1025-1225 as in previous session, this is not ensured. First available block is allocated.
4. correct. If you have default settings (2 ranges of 200 ports per user allowed), then if user runs out of port range he request port to be opened, if used one port range then second and last port range is allocated to him, if he already used both ranges then such request for additional port is rejected. therefore no session opened and user will see it as inaccessible resource (Internet or wherever he tried to connect to).
Turn TSAgent logging to debug (temporarily) and both allocation success & reject actions are logged in with reference to session id, then track back logon to find user belonging to session id.
Kind regards, Tomas
Tomas Stribrny - NASDAQ:FTNT - Fortinet Inc. - TAC Staff Engineer
AAA, MFA, VoIP and other Fortinet stuff
Select Forum Responses to become Knowledge Articles!
Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.
User | Count |
---|---|
1742 | |
1110 | |
759 | |
447 | |
240 |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.