• Willkommen im Linux Club - dem deutschsprachigen Supportforum für GNU/Linux. Registriere dich kostenlos, um alle Inhalte zu sehen und Fragen zu stellen.

vsftpd - IP freie Logs

catcha

Newbie
Ich würde gerne keine IP Adressen in meinen Logs haben, falles jemand hierzu eine Idee hätte - das wäre wunderbar.

Ein komplettes deaktivieren des Logs kommt für mich allerdings nicht in Frage.

Danke - catcha.
 
OP
C

catcha

Newbie
Hallo,

aber dann werden sie ja immernoch gelogged ;)

Am liebsten wäre mir ich könnte ein Logformat definieren (beispielsweise beim ProFTPD so möglich).

Frage: welche Logs?
vsftpd : https://security.appspot.com/vsftpd.html

Danke - catcha.
 

RME

Advanced Hacker
RME schrieb:
Frage: welche Logs?
Sorry, habe den Titel nicht gelesen :D

Konfiguration:

Siehe die Dateien in: vsftpd-2.3.4/EXAMPLE/INTERNET_SITE

log_on_success += PID HOST DURATION
log_on_failure += HOST

This will log the IP address of all connection attempts - successful or not,
along with the time. If an FTP server is launched for the connection, it's
process ID and usage duration will be logged too. If you are using RedHat
like me, this log information will appear in /var/log/secure.
Ansonsten hast Du ja den Source-Code ;)

Gruss,
Roland
 
OP
C

catcha

Newbie
Okay ... 'quick and dirty' habe ich dann erstmal die entsprechende Zeile im Source ersetzt:

Code:
*** logging.c
--- logging.c_version_234
***************
*** 329,336 ****
        break;
    }
    str_append_text(p_str, ": Client \"");
! /*  str_append_str(p_str, &p_sess->remote_ip_str); */
!   str_append_text(p_str, "NOIP");
    str_append_char(p_str, '"');
    if (what == kVSFLogEntryLogin && !str_isempty(&p_sess->anon_pass_str))
    {
--- 329,335 ----
        break;
    }
    str_append_text(p_str, ": Client \"");
!   str_append_str(p_str, &p_sess->remote_ip_str);
    str_append_char(p_str, '"');
    if (what == kVSFLogEntryLogin && !str_isempty(&p_sess->anon_pass_str))
    {

Jetzt steht im Log erstmal 'NOIP' - glücklich bin ich damit jedoch noch nicht ;)

- catcha.
 

RME

Advanced Hacker
Jetzt steht im Log erstmal 'NOIP' - glücklich bin ich damit jedoch noch nicht ;)
Also ich bin mir nicht sicher was Du meinst. Wenn Dir 'NOIP' nicht gefällt (also Du möchtest lieber gar nichts dort), dann schreib doch einfach nichts;

Code:
        break;
    }
    str_append_text(p_str, ": Client ");
    if (what == kVSFLogEntryLogin && !str_isempty(&p_sess->anon_pass_str))
    {
oder sogar:

Code:
        break;
    }
    if (what == kVSFLogEntryLogin && !str_isempty(&p_sess->anon_pass_str))
    {
Gruss,
Roland
 
OP
C

catcha

Newbie
hehe ... 'NOIP' ist schon okay (sonst hätte ich es ja nicht geschrieben :p)

Ob da überhaupt was anstatt der IP was im Log steht, ist mir egal.

Was mir nicht gefällt ist den source zu verändern ;)

Denn so muss ich ja bei jedem Update den source erneut anpassen, also was ich mir wünschen würde wäre eine Möglichkeit das per Konfiguration zu ändern.

- catcha.
 
Oben