[FreeNX-kNX] fail2ban and freenx

jhonyl at netscape.net jhonyl at netscape.net
Sat Mar 15 23:08:33 UTC 2008

Hi Fabian,

  Thanks for the answer, I wanted to write it in the wiki (as is 
suggested in the freenx mailing list signature), but I couldn't 
register. There is some problem with registeration there:


You don't have permission to access /index-en.phtml on this server."

Anyway I added :

logger -t nxserver -i -p auth.info "(`whoami`) Failed login for 
user=$USER from IP=`echo $SSH_CLIENT| awk '{print $1}'`"

Where you have indicated, and it works fine.

Thanks again.

-----Original Message-----

From: Fabian Franz <FabianFranz at gmx.de>

To: User Support for FreeNX Server and kNX Client <freenx-knx at kde.org>

Sent: Fri, 14 Mar 2008 11:35 am

Subject: Re: [FreeNX-kNX] fail2ban and freenx

> Hi,




>   I started to use fail2ban, an application that read log files and 

> it finds an IP that is trying to login too many times and failing it

> blocks it in the firewall for ten minutes. This is to prevent

> dictionary attacks. I wanted to see if it finds my nx login failures

> but unfortunately when nx client is login in it first login from its 

> using the key, and then using a password from So the

> failures are registering on and not on the real IP.


>   Please tell me if there is some log file where login failures would 

> registered with the real IP and the time of failure.  Or if I can

> modify something to get that.

You can modify nxserver.

Search for 404 and add a syslog command or whatever. The IP can be 
gotten from



echo "NX> 404 [...]"

syslog [... params ...] "Failed login for USER $USER. IP=$SSH_CLIENT".

Or whatever.

As I pointed out in IRC you can also use another public/private key 
pair, which

you deploy to clients to reach your goal of preventing attackers.

Best Regards,



     Were you helped on this list with your FreeNX problem?

    Then please write up the solution in the FreeNX Wiki/FAQ:


         Don't forget to check the NX Knowledge Base:



       FreeNX-kNX mailing list --- FreeNX-kNX at kde.org



More information about the FreeNX-kNX mailing list