-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pass remote ip address to PAM #392
Comments
That's interesting. Worth enough to implement if possible. |
I looked into the code, and there is one related issue: namely that sesman does not know aboutthe IP address of the client to xrdp. Passing the address to PAM, once known, is trivial and I already implemented that. If you can give me a hint on how to possibly pass the socket address, as known to kog_msg in os_calls.c, to sesman, I could finish this. However, I think this needs changes in the sesman protocol. |
On a related note, users in my company are complaining that they get prompts for updates, even though PackageKit is configured to only authenticate local users. It turns out that xrdp sessions are considered local. Also, they are not consider active for whatever reason. If we fix that, it would be great. Let's code the right thing for the latest and greatest PAM, and I'll take care of the nice looking backport ;)
|
I think this would need a few things done:
There are a number of PAM modules, beyond fail2ban, which use the client IP. For example, Duo's PAM module (which implements two-step authentication) can use |
Just a quick note on the original request "Trying to handle RDP logins in fail2ban" The fail2ban config can be set to monitor any log it can access and can be customised to grab the IP address using regex strings. In essence, for fail2ban use - xrdp could simply log the IP in syslog when a user fails to authenticate. |
Could I ask what the status is of this? I have followed up on @akkornel's ideas, but I'm out of my depth and haven't been able to get it working (yet?). |
I've just started research to implement it since last week. |
Cool, if there is anything I can do to help test, ('cause you don't want my C to end up in prod ;) let me know. |
Sorry to bump this old thread, but is this still planned to be implemented? As mentioned above, it would be helpful for 2FA (like Duo) to know the client IP and determine whether the connection is from a trusted network. Thanks. |
@metalefty - I see you've got this self-assigned at the mo'. If you're struggling to find time to pick it up I'll be happy to do so. Let me me know. Thanks, |
Trying to handle RDP logins in fail2ban, I found that the PAM stack apparently does not receive the address of the remote host trying to authenticate. I can imagine that knowledge of that could come in handy in other situations as well.
Is it possible to make xrdp pass the remote address to PAM as rhost?
The text was updated successfully, but these errors were encountered: