Viele Samba Log-Files

Post Reply
Message
Author
Tim-82

Viele Samba Log-Files

#1 Post by Tim-82 »

hi @ all

ich hab ne menge samba log dateien (/var/log/samba/log.*IP*), auf meinem (heim)server.
massenweise ip's die mir nicht "gehören".

die logs sind meistens leer, bzw. ohne infos über zugriffe.

der server hat zwei netzwerkkarten. 1x dsl, 1x lan

in smb.conf ist interfaces = eth0 (lan)

zeigen die logs mir jetzt zugriffsversuche vom internet????
das ist doch nicht normal.

danke und frohe weihnachten

User avatar
Soulfly
Posts: 137
Joined: 16. Apr 2003 5:05
Location: Buchholz idN

#2 Post by Soulfly »

Hm, sind das denn pricate IP Adressen oder öffentliche?

Tim-82

#3 Post by Tim-82 »

es sind alle arten von ip adressen dabei

84.149.*.*
211.21.*.*
usw.
usw.

und des sind mehr als 2000 versch. log files.

der großteil ist komplett leer.
manche haben den inhalt wie z.b.

##########################
[2005/12/10 15:05:10, 0] lib/util_sock.c:read_socket_data(384)
read_socket_data: recv failure for 4. Error = Connection timed out
[2005/12/12 23:06:11, 0] lib/util_sock.c:read_socket_data(384)
read_socket_data: recv failure for 4. Error = Connection reset by peer
#######################

mein lan hat 4 rechner.

danke
mfg

User avatar
Soulfly
Posts: 137
Joined: 16. Apr 2003 5:05
Location: Buchholz idN

#4 Post by Soulfly »

Da dein Rechner eine direkte Verbindung ins Internet hat, wäre es wohl angebracht eine Firewall zu benutzen, bzw die Vorhandene anzupassen.

Welche Distribution benutzt du? Je nachdem sind schon vorgefertigte dabei....

Man kann natürlich auch den Samba dazu bringen nur auf ein bestimmtes Subnet zu hören, allerdings sollte man sich schon über eine entsprechende Absicherung des gesammten Systemes gedanken machen....

Tim-82

#5 Post by Tim-82 »

Ich hab Debian Woody mit 2.6 Kernel

hab mir auch gedacht das ne fw die lösung ist.

gibts da ne einfache möglichkeit eine firewall zu konfigurieren.
das mit iptables war mir bis jetz viel zu kompliziert.

aber das da mehr als 2000 log files gemacht werden wundert mich.
das sind ja mehr als 2000 verbindungsversuche von drausen.

und was nutzt die "use interfaces" einstellung dann in der smb.conf???

mfg

User avatar
Soulfly
Posts: 137
Joined: 16. Apr 2003 5:05
Location: Buchholz idN

#6 Post by Soulfly »

Zur Firewall. Ich kann dir nun kein Patentrezept nennen wie du die Firewall konfigurieren sollst, da es immer auf die jeweiligen bedürfnisse ankommt. Es gibt hier auf Pro-Linux einen Artikel der den Aufbau einer Firewall recht brauchbar beschreibt, du mußt es nur deinen Wünschen entsprechend anpassen... http://www.pro-linux.de/t_netzwerk/fire ... enbau.html

User avatar
jochen
prolinux-forum-admin
Posts: 699
Joined: 14. Jan 2000 15:37
Location: Jülich
Contact:

#7 Post by jochen »

Tja, vielleicht die Konfig geändert, aber dann vergessen, Samba neu zu starten?

Ansonsten mal mittels

Code: Select all

netstat -lpnt | egrep 'smbd|nmbd'
prüfen, ob sich die Dämonen auch wirklich nur an die IP gebunden haben, die zu eth0 gehört.

EDIT: Ah - ich wusste doch, dass die Doku zu smb.conf noch was hergibt! Schau mal unter "bind interfaces only":
bind interfaces only (G)

This global parameter allows the Samba admin to limit what interfaces on a machine will serve SMB requests. It affects file service smbd(8) and name service nmbd(8) in a slightly different ways.

For name service it causes nmbd to bind to ports 137 and 138 on the interfaces listed in the interfaces parameter. nmbd also binds to the "all addresses" interface (0.0.0.0) on ports 137 and 138 for the purposes of reading broadcast messages. If this option is not set then nmbd will service name requests on all of these sockets. If bind interfaces only is set then nmbd will check the source address of any packets coming in on the broadcast sockets and discard any that don't match the broadcast addresses of the interfaces in the interfaces parameter list. As unicast packets are received on the other sockets it allows nmbd to refuse to serve names to machines that send packets that arrive through any interfaces not listed in the interfaces list. IP Source address spoofing does defeat this simple check, however, so it must not be used seriously as a security feature for nmbd.

For file service it causes smbd(8) to bind only to the interface list given in the interfaces parameter. This restricts the networks that smbd will serve to packets coming in those interfaces. Note that you should not use this parameter for machines that are serving PPP or other intermittent or non-broadcast network interfaces as it will not cope with non-permanent interfaces.

If bind interfaces only is set then unless the network address 127.0.0.1 is added to the interfaces parameter list smbpasswd(8) and swat(8) may not work as expected due to the reasons covered below.

To change a users SMB password, the smbpasswd by default connects to the localhost - 127.0.0.1 address as an SMB client to issue the password change request. If bind interfaces only is set then unless the network address 127.0.0.1 is added to the interfaces parameter list then smbpasswd will fail to connect in it's default mode. smbpasswd can be forced to use the primary IP interface of the local host by using its smbpasswd(8) -r remote machine parameter, with remote machine set to the IP name of the primary interface of the local host.

The swat status page tries to connect with smbd and nmbd at the address 127.0.0.1 to determine if they are running. Not adding 127.0.0.1 will cause smbd and nmbd to always show "not running" even if they really are. This can prevent swat from starting/stopping/restarting smbd and nmbd.

Default: bind interfaces only = no
Da der Default "no" ist, müsstest Du den auf "yes" setzen, damit sich die Daemons nur an eth0 binden.

Aber die Idee mit der Firewall ist sicherlich auch korrekt: Sicherheit immer die die Tiefe planen...

Jochen
Die grösste Lüge der EDV? "Mal eben..."

Tim-82

#8 Post by Tim-82 »

Danke @jochen

bind interfaces only = yes
interfaces = eth0

tut schon mal seinen dienst. keine neuen logs vom inet.

Danke @Soulfly

Das tutorial werd ich mir genauer anschaun. bis jetzt sehr verständlich. DANKE

Post Reply