Gene6 FTP Server Forum: Notify user if IP is banned - Gene6 FTP Server Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Notify user if IP is banned Is this possible ? Rate Topic: -----

#1 User is offline   Boost 

  • Addicted Member
  • Group: Experts
  • Posts: 1383
  • Joined: 16-August 04
  • Gender:Male
  • Location:Denmark

  Posted 28 September 2004 - 04:30 PM

Hi there..

When users try to connect from an IP that is not allowed, then users only get

"421 Not logged in, access denied."


Is it possible to tell the user that the IP is denied/banned ?

Maybe with a script or something ?
0

#2 User is offline   Codspirit 

  • Mr Code
  • Group: Moderators
  • Posts: 3317
  • Joined: 23-August 04
  • Gender:Male
  • Location:France
  • Interests:Coding, Scripting ...

Posted 28 September 2004 - 04:39 PM

We have this available in scripts :
OnClientBanned : client tried to connect but is banned from domain

Edit:
But :
I is only triggered in "Domain" context.
It can't send messages to Client (or too late). (Post doesn't work as there are no more server messages after)

This post has been edited by CodSpirit: 29 September 2004 - 12:26 AM

If you get a "file not found" error when folowing a link to my ftp, please use your favorite ftp client and try getting the file again.
(I have some case sensivity problems)

Please do not use PM for support
0

#3 User is offline   Boost 

  • Addicted Member
  • Group: Experts
  • Posts: 1383
  • Joined: 16-August 04
  • Gender:Male
  • Location:Denmark

  Posted 28 September 2004 - 09:00 PM

It seems that the client is disconnected before the message is sent.

Made this script:

CODE
sub OnClientBanned()
    client.send 421, "IP is banned"
end sub



this is the serverlog:

CODE
04/09/28 21:57:25, 23, 172.16.0.2, boost, 421 Not logged in, access denied.
04/09/28 21:57:25, 23, 172.16.0.2, boost, will be disconnected : IP is banned.
04/09/28 21:57:25, 23, 172.16.0.2, boost, 421 IP is banned


And this is the ftp client log

CODE
[21:57:25] 421 Not logged in, access denied.
[21:57:25] Connection failed

0

#4 User is offline   Codspirit 

  • Mr Code
  • Group: Moderators
  • Posts: 3317
  • Joined: 23-August 04
  • Gender:Male
  • Location:France
  • Interests:Coding, Scripting ...

Posted 28 September 2004 - 09:10 PM

Yes, did the same and conclued what I post previously.
If you get a "file not found" error when folowing a link to my ftp, please use your favorite ftp client and try getting the file again.
(I have some case sensivity problems)

Please do not use PM for support
0

#5 User is offline   Boost 

  • Addicted Member
  • Group: Experts
  • Posts: 1383
  • Joined: 16-August 04
  • Gender:Male
  • Location:Denmark

  Posted 01 December 2004 - 12:46 PM

Is this still not possible in the new version ?
0

#6 User is offline   Codspirit 

  • Mr Code
  • Group: Moderators
  • Posts: 3317
  • Joined: 23-August 04
  • Gender:Male
  • Location:France
  • Interests:Coding, Scripting ...

Posted 01 December 2004 - 12:48 PM

Still.
If you get a "file not found" error when folowing a link to my ftp, please use your favorite ftp client and try getting the file again.
(I have some case sensivity problems)

Please do not use PM for support
0

#7 User is offline   Boost 

  • Addicted Member
  • Group: Experts
  • Posts: 1383
  • Joined: 16-August 04
  • Gender:Male
  • Location:Denmark

Posted 01 December 2004 - 12:49 PM

Too bad sad.gif
0

#8 User is offline   Codspirit 

  • Mr Code
  • Group: Moderators
  • Posts: 3317
  • Joined: 23-August 04
  • Gender:Male
  • Location:France
  • Interests:Coding, Scripting ...

Posted 01 December 2004 - 12:51 PM

Yes ... sad.gif

But we can see with the developper is this is possible ... there's hope until he said "no" tongue.gif
If you get a "file not found" error when folowing a link to my ftp, please use your favorite ftp client and try getting the file again.
(I have some case sensivity problems)

Please do not use PM for support
0

#9 User is offline   Codspirit 

  • Mr Code
  • Group: Moderators
  • Posts: 3317
  • Joined: 23-August 04
  • Gender:Male
  • Location:France
  • Interests:Coding, Scripting ...

Posted 01 December 2004 - 02:01 PM

Here is what G.Roger said :
  • If you want to send a reason/tell to user why he is banned, just use reason in the ip access list
  • If your ip access list only has + entries then add a -* entry with a reason[/QUOTE]
  • If you want to change "Not logged in, access denied" you can do it !

    Just edit your domain's settings.ini file and look for the line :
    [Messages]
    (If you can't find it, just add it at the end.)
    Then add these lines :
    msgUnauthorizedAccessWithReason=Not logged in, access denied (%s).
    msgUnauthorizedAccess=Not logged in, access denied.

    Now, you can change the messages to whatever you want. In msgUnauthorizedAccessWithReason, the %s is replaced by the reason.

    Ie:
    CODE
    [Messages]
    msgUnauthorizedAccessWithReason=IP banned (Reason : %s).
    msgUnauthorizedAccess=IP banned.

This post has been edited by CodSpirit: 01 December 2004 - 02:04 PM

If you get a "file not found" error when folowing a link to my ftp, please use your favorite ftp client and try getting the file again.
(I have some case sensivity problems)

Please do not use PM for support
0

#10 User is offline   Boost 

  • Addicted Member
  • Group: Experts
  • Posts: 1383
  • Joined: 16-August 04
  • Gender:Male
  • Location:Denmark

Posted 24 January 2005 - 01:46 PM

This wont work with "*.hostname.com" in the allow list as G6 checks IP's first and that matches * in the disallow list, so the user is denied access all the time huh.gif
0

#11 User is offline   Malaki86 

  • New Member
  • Pip
  • Group: Members
  • Posts: 6
  • Joined: 08-June 05

Posted 08 June 2005 - 11:08 PM

Is it possible to make a script to perm ban an unauthorized ip?
0

#12 User is offline   Codspirit 

  • Mr Code
  • Group: Moderators
  • Posts: 3317
  • Joined: 23-August 04
  • Gender:Male
  • Location:France
  • Interests:Coding, Scripting ...

Posted 08 June 2005 - 11:13 PM

QUOTE (Malaki86 @ Jun 9 2005, 12:08 AM)
Is it possible to make a script to perm ban an unauthorized ip?


Well, for me an "unauthorized ip" IS a perm ban.
Please me more explicit wink.gif

And I suggest making a new topic for this as it is a little off-topic here.
If you get a "file not found" error when folowing a link to my ftp, please use your favorite ftp client and try getting the file again.
(I have some case sensivity problems)

Please do not use PM for support
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users