PDA

View Full Version : Service


Mr_X
02-10-2005, 01:21 PM
Type: Utility / Application

Make ioFTPD running as a service

Put this in ioFTPD system dir (where ioftpd.exe is located).
To install service (Automatic Start), type "ioservice -i" (to uninstall: "ioservice -u").
Then start first time service with: "net start ioftpd" (or reboot computer).
The program is warned when ioFTPD crashed or was killed and immediatly restart it.

If you want to use secure connections (SSL/TLS), you have to do this (Thanks to oldino and gpyfsk):
first U have to run ioftp as a service

You must have this in etc\ioftpd.env:
SYSTEMDRIVE=%[environment(SYSTEMDRIVE)]
SYSTEMROOT=%[environment(SYSTEMROOT)]

If they weren't there you have to restart ioftpd

Extract makecert.exe and rsa.bat in scripts\cert

in ioftpd.ini, add this line under FTP_Custom_Commands:
rsa = EXEC ..\scripts\cert\rsa.bat
don't forget to do a SITE CONFIG REHASH

Edit rsa.bat and replace the 2 NAME by your ip/host and then execute command under ioftpd then
u will have new cert under system dir. Double click it and voilà .

Of course don't forget to edit ioftpd settings for SSL/TLS and restart it
If U want 168bit 3DES as in glFTPD, set Encryption_Protocol to TLS and Min_Cipher_Strength and Max_Cipher_Strength to 168


Script page:
makecert and rsa.bat: http://esibruxelles.free.fr/ioservice/ioServiceSSL.zip
http://esibruxelles.free.fr/ioservice/
http://www.inicom.net/pages/en.ioftpd-scripts.php?id=77


Changelog:
0.1: First version
0.2: Bug found (crashes after 150 sec). Just replace exe
0.3: Automatically delete ioftpd.crash.log if exist. Just replace exe
0.4:
* Now instataneously restart ioftpd process if crashed or killed
* There's 2 versions: one that deletes ioftpd.crash.log and another without

oldhouse80
02-11-2005, 07:42 AM
If u have shareDB and install ioftp as a service with this nice script, u must be careful about how u install odbc service, otherwise ioftp will crash everytime ioservice runs it.

When u add odbc service to listen to sharedb, instead of adding it in the first tab (user dsn), choose to add the sql odbc server under system dsn, otherwise your ioftpd will not be able to look at user db and obviously will crash.

Certificate trick has already been tested on 3 sites and works great so u shouldn't have problems anymore with ioftp as a service!!!

Enjoy :)

Mr_X
07-19-2005, 07:22 AM
New URL for the script (cause moving forum lost most scripts):
http://esibruxelles.free.fr/ioservice/

Mr_X
08-14-2005, 07:09 AM
I just reuploaded ioServiceSSL.rar and made download link

leeson
08-14-2005, 01:28 PM
looks great
i'll try it :)

zOrP
08-15-2005, 02:26 AM
hmm..
when i do
site rsa
i get this

R] site rsa
[R] 200-
[R] 200-C:\ioFTPD\system>makecert.exe -r -n "CN=10.0.0.2" -b 01/01/2004 -e 01/01/2010 -eku 1.3.6.1.5.5.7.3.1 -ss my -sr CurrentUser -sk 10.0.0.2 -a md5 -sky exchange -sp "Microsoft RSA SChannel Cryptographic Provider" -sy 12 ioftpd.cer
[R] 200-Error: Save encoded certificate to store failed => 0x3 (3)

any ideas ??

btw, i followed the readme.. so why does it say C:\ioFTPD\system>makecert.exe when its placed in c:\ioFTPD\scripts\cert
?
but i copied it so its both places..

Still dont work.. :/

Mr_X
08-15-2005, 05:31 AM
Put makecert.exe in ioftpd system dir and retry "site rsa".

Webpage and first post edited.

zOrP
08-15-2005, 07:15 AM
i tried that.. and also tried copying the bat to system dir..

the ioftpd.cer pops up
but same error..
and auth ssl not supported.. :x

Mr_X
08-15-2005, 10:56 AM
I succeded creating and installing cert on windows then modifying ioftpd.ini then a restart ioftpd.
Meet me on irc, i'll try to help you: I have nick Mister_X

InvisiGod
11-08-2005, 10:52 AM
hmm, tried to install io as a service and i followed ur tut, but when i try to net start ioftpd i get an error which says that ioftpd could not be startet...

i'm using io 5.8.6r

what went wrong?

ekke
11-29-2005, 03:48 PM
in rsa.bat , if you are behind NAT should you enter the "private" ip that the ioftp servar actually running on ( ie 192.168.0.10 ) or the public IP från ur isp that you are using and portforwaring to the private ip ?

Mr_X
11-29-2005, 05:13 PM
it's not very important (it's what i think). And i used my computer's name for the certificate. You can use everything you want, it's just a name.

Mr_X
01-28-2006, 11:20 AM
I updated instructions to install SSL/TLS to ioftpd running as a service.

void4ever
03-07-2006, 01:42 AM
I'm having an issue with certain scripts (namely alcobot) not seeing the messagewindow when ioFTPD is run as a service.

I tried adding WindowName = ioFTPD::MessageWindow to my INI hoping it wouldn't get lost in the mix but it still does.

I can only assume that because it's running as a service it's taking on ioservices window name? Because if i remove the service and run ioFTPD by itself it works just fine.

So my question, is it possible ioftpd is taking on ioservices window name, and if it is, what is that window name so i can modify the alcobot settings.

If thats completely off base does anyone have any ideas?

EwarWoo
03-07-2006, 04:10 AM
Make sure the eggdrop and the ioFTPD are running from the same account.
You'll prolly find ioFTPD is running as SYSTEM and the bot as [USERNAME].
They're in a different shared memory space so cant see each other if using different accounts.

void4ever
03-07-2006, 01:00 PM
yes it is running as SYSTEM because it's a service. I was unaware that they couldn't see eachothers memory space in that respect. I appreciate the info, looks like the bot is turning into a service tonight as well :P

Thanks again!

Void4ever

whocarez2k5
04-02-2006, 05:25 PM
@MR X
I followed your SSL guide and i did't everything like said in readme but when i logon i get this msg:

[1] 220 FTP Server ready.
[1] AUTH SSL
[1] 504 AUTH SSL unsupported.

I have set ioftpd.ini like this

Require_Encrypted_Auth = *
Require_Encrypted_Data = *
Certificate_Name = my.ip.stands.here
Explicit_Encryption = True
Encryption_Protocol = SSL3
Min_Cipher_Strength = 128
Max_Cipher_Strength = 256

What have i done so far:
Installed io as service --> working perfect ;)
Added lines to ioftpd.env
Created cert
Installed cert
Changed ioFTPD.ini (see above)
Changed SSL/TSL settings ftp program (AUTH SSL)
Started io and nothing happends :(

What am i doing wrong?

:update:
After alot of reading i noticed that for many a system reboot solved problem and it did for me also ;)

Only problem atm is that some 1 connects to server there isn't any msg displayed when he is not on a SSL connection.
Any ideas?

instead off error msg to use ssl i get this

[2] PASS (hidden)
[2] 530 Login failed: Invalid password.

_panic_
04-03-2006, 12:44 PM
Only problem atm is that some 1 connects to server there isn't any msg displayed when he is not on a SSL connection.
Any ideas?

instead off error msg to use ssl i get this

[2] PASS (hidden)
[2] 530 Login failed: Invalid password.

i don't believe there is a cookie indicating whether the connection is encrypted or not.

g00dwin
04-12-2006, 02:19 PM
can i make ioFTPD and eggdrop working as one service with this script? i was make ioFTPD and eggdrop run as one single service, i.e. i had service called "ioFTPD - Service" and when i run it it runs ioFTPD and eggdrop together and SSL worked fine, but now i cant remember how i did that hehe

Mr_X
04-16-2006, 12:32 PM
g00dwin, you can, just start eggdrop with "OnServerStart" event.
Another thing. I think i'll post source code of Service (in GPL), I don't have so much time to improve it, i'm working on a project that takes all my time ;)