this is my environment:
PA3020 PANOS 6.0.2
3 Terminal Servers running on Windows Server 2012 R2 Datacencer, each one having PA TS Agent 6.0.3-8 onboard.
Documentation states that Windows Server 2012 is supported by TS Agent starting from 6.0.2, it's been a very long time I was waiting for this, till now I've tried previous versions of TS Agent in compatibility mode but the issue was that logged-in user traffic was generated from System Source Port Allocation Range instead Source Port Allocation Range althoug logged-in users were apparently assigned with correct source port ranges.
Now that I moved to TS agent 6.0.3 I was hoping to solve but I'm in the very same situation: logged-in user traffic is being generated from System Source Port Allocation Range instead User Source Port Allocation Range
Let's have a look to my TS agent configuration
It should be as best practice is suggesting.
And here you can see the correct user-portrange mappings
Unfortunately only a little bit of logged-in user traffic comes out from assigned port ranges, but most of all it comes from system allocated ports
I've successfully shrinked the System Port Allocation Range with commands netsh int <ipv4|ipv6> set dynamic <tcp|udp> start=number num=range hoping it'll have reduced the chance the traffic would be sourced from those ports but still no way to obtain the purpose and most of sessions originate from system range...
Please note that none of the users are logged in with /admin option.
Is there anything missing/wrong?
While we investigate why the ports are showing up as the system source ports rather than the user source ports, could you please confirm one thing: do you have User Identification enabled on the zone this traffic comes in on? This might explain the "empty" field you see for source user.
Also, what is the version of the PAN OS on the firewall? Also, is this happening on the GUI only, or do you find that the CLI also reports the same incorrect info for the ports and shows no users for the source user?
Hi, yes sorry not to have specified, "lan" zone you can see in the traffic log has already user-identification enabled, all UID Agent mappings are working and all traffic is seen as "user traffic" and not simple ip traffic.
The reason why a say "most of traffic coming from terminal servers" is that a tiny little bit of it is seen with user information, but all the rest is with empty user, let's say 99%...
Hope it helps
PANOS is 6.0.2
As for the cli, if mean the show user ip-port-user-mapping all command, yes it shows the same mappings.
Vsys 1, Flag 3
Port range: 20000 - 57499
Port size: start 400; max 4000
Block count 94, port count 37500
Besides I have no match on the correct sec rules where users are indicated
If you need some other output let me know.
To view user ip port mappings you should use
show user ip-port-user-mapping
When looking at the URL Filtering Logs the information for TS Agent user ip mappings is not available in there.
The debug logs of user id daemon would also show the correct mappings.
However, if you are not hitting the correct security rules, then there appears to be another issue. What do you see in the traffic logs? Can you share the output of a "show session info filter source <source user>"?
I believe I've not explained, if one of my terminal servers is, i.e., 172.30.2.121 and in the Traffic Log I use the filter " ( addr.src in 172.30.2.121 ) " I can see a lot of traffic sourced from the server, almost all of it is with EMPTY user and source port=System Port Allocation Range, a little bit is with user and source port=User Port Allocation Range
Isn't this enough to say that I don't have user information for the server?
I've made test rules with source ip only=terminal servers and user=any, and of course they're hit. I can't explain how many rules are in production, some servers are to be filtered accounting for logged in users, some servers not, now it's not of interest, the matter is that I don't have user information on TS servers.
After show session info there is no other option
admin@itsg-fw2(active)> show session info
| Pipe through a command
<Enter> Finish input
The command is
show session all filter source <source user>
Am trying to determine if you are missing info in only the GUI logs or does the device genuinely not see the users mapped correctly.
The URL filtering logs will not show the user when users are mapped from the TS agent
The traffic logs should and the session info should
Ok, now I'm logged in on 172.30.2.121
If filtering by ip-only I see traffic
show session all filter source 172.30.2.121
ID Application State Type Flag Src[Sport]/Zone/Proto (translated IP[Port])
Vsys Dst[Dport]/Zone (translated IP[Port])
73733 undecided ACTIVE FLOW NS 172.30.2.121/lan/6 (184.108.40.206)
vsys1 220.127.116.11/wan1 (18.104.22.168)
222914 web-browsing ACTIVE FLOW NS 172.30.2.121/lan/6 (22.214.171.124)
vsys1 126.96.36.199/wan1 (188.8.131.52)
89324 twitter-base ACTIVE FLOW NS 172.30.2.121/lan/6 (184.108.40.206)
vsys1 220.127.116.11/wan1 (18.104.22.168)
218569 undecided ACTIVE FLOW NS 172.30.2.121/lan/6 (22.214.171.124)
vsys1 126.96.36.199/wan1 (188.8.131.52)
167940 undecided ACTIVE FLOW NS 172.30.2.121/lan/6 (184.108.40.206)
vsys1 220.127.116.11/wan1 (18.104.22.168)
When filtering for user also I have no traffic from the same source IP, even though it's me that generates the requests you can ses above
show session all filter source-user *****\**** source 172.30.2.121
Also how can the device see the users mapped correctly if traffic has high source ports not mapped to any users..?
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!