PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Firewall soll Samba blocken



Dennis_S
25.06.02, 20:58
Ich hab seit kurzem Samba auf meinem Rechner. Bevor ich das hatte, war es nicht möglich von aussen irgendwelche Informationen, wie z.B. Rechnername auszulesen. Nun geht das aber. Online Portscanner belegen es. Aber wie kommt das zu stande, wo ich doch eine Firewall habe! Auch wird mir gesagt, das Port 113 zwar geschlossen aber nicht stealth ist, wie die anderen, nicht benutzten Ports. Ich vermute, das darüber die Informationen freigeben worden sind. Wie kann ich die Firewall wirklich dicht machen? SuSEfirewall2

kberger
26.06.02, 15:43
Hallo Dennis,
gib doch bitte an, ob die Firewall und der Samba auf einem Rechner sind.
Und gib mal Deine Konfiguration der Firewall an.
Dienste dürfen nur "INT" freigegeben sein.
"EXT" freilassen.

Gruß Klaus

Dennis_S
26.06.02, 16:35
es läuft alles auf einem Rechner (Firewall und Samba). Intern wird Samba geroutet. Von aussen kommt nichts rein. Eine Verbinung von aussen an den Samba Server ist auch nicht möglich, aber warum können meine Computer Informationen gelesen werden seit Samba installiert ist?

Jinto
26.06.02, 20:37
Was sagen denn die Online Scanner? Die geben eigentlich an, woher sie ihre Informationen beziehen (z.B. Port 139).

Bist du dir ganz sicher, dass die SuSEfirewall2 überhaupt installiert bzw. aktriviert ist (was ich derzeit bezweifle)?

HTH

Dennis_S
27.06.02, 13:16
Original geschrieben von Jinto

Bist du dir ganz sicher, dass die SuSEfirewall2 überhaupt installiert bzw. aktriviert ist (was ich derzeit bezweifle)?


Hey, ich bin zwar kein Linux Profi, aber die Firewall ist garantiert aktiviert. Woher sollte das den hier sonst herkommen? :D
SuSE-FW-DROP-DEFAULT IN=ppp0 OUT= MAC= SRC=212.160.183.43 DST=80.133.30.151 LEN=48 TOS=0x00 PREC=0x00 TTL=116 ID=47162 DF PROTO=TCP SPT=21059 DPT=1214 WINDOW=8192 RES=0x00 SYN URGP=0 OPT (0204020001010402)
Jun 27 14:02:43 xerxes kernel: SuSE-FW-DROP-DEFAULT IN=ppp0 OUT= MAC= SRC=212.160.183.43 DST=80.133.30.151 LEN=48 TOS=0x00 PREC=0x00 TTL=116 ID=5691 DF PROTO=TCP SPT=21059 DPT=1214 WINDOW=8192 RES=0x00 SYN URGP=0 OPT (0204020001010402)
Jun 27 14:02:55 xerxes kernel: SuSE-FW-DROP-DEFAULT IN=ppp0 OUT= MAC= SRC=212.160.183.43 DST=80.133.30.151 LEN=48 TOS=0x00 PREC=0x00 TTL=116 ID=64571 DF PROTO=TCP SPT=21059 DPT=1214 WINDOW=8192 RES=0x00 SYN URGP=0 OPT (0204020001010402)
Jun 27 14:06:06 xerxes kernel: SuSE-FW-DROP-DEFAULT IN=ppp0 OUT= MAC= SRC=80.137.187.79 DST=80.133.30.151 LEN=52 TOS=0x00 PREC=0x00 TTL=124 ID=9959 DF PROTO=TCP SPT=3285 DPT=1214 WINDOW=32767 RES=0x00 SYN URGP=0 OPT (020405840103030001010402)
Jun 27 14:06:09 xerxes kernel: SuSE-FW-DROP-DEFAULT IN=ppp0 OUT= MAC= SRC=80.137.187.79 DST=80.133.30.151 LEN=52 TOS=0x00 PREC=0x00 TTL=124 ID=9980 DF PROTO=TCP SPT=3285 DPT=1214 WINDOW=32767 RES=0x00 SYN URGP=0 OPT (020405840103030001010402)
Jun 27 14:06:15 xerxes kernel: SuSE-FW-DROP-DEFAULT IN=ppp0 OUT= MAC= SRC=80.137.187.79 DST=80.133.30.151 LEN=52 TOS=0x00 PREC=0x00 TTL=124 ID=10021 DF PROTO=TCP SPT=3285 DPT=1214 WINDOW=32767 RES=0x00 SYN URGP=0 OPT (020405840103030001010402)
Jun 27 14:07:29 xerxes kernel: SuSE-FW-DROP-DEFAULT IN=ppp0 OUT= MAC= SRC=193.253.226.13 DST=80.133.30.151 LEN=48 TOS=0x00 PREC=0x00 TTL=115 ID=42386 DF PROTO=TCP SPT=2668 DPT=1214 WINDOW=16384 RES=0x00 SYN URGP=0 OPT (0204058401010402)
Jun 27 14:07:31 xerxes kernel: SuSE-FW-DROP-DEFAULT IN=ppp0 OUT= MAC= SRC=193.253.226.13 DST=80.133.30.151 LEN=48 TOS=0x00 PREC=0x00 TTL=115 ID=42421 DF PROTO=TCP SPT=2668 DPT=1214 WINDOW=16384 RES=0x00 SYN URGP=0 OPT (0204058401010402)

Ich vermute Grund hierfür ist Port 113. Es wird als INDENT bezeichnet und für die Rechneridentifikation benutzt. Da es scheinbar wichtig ist, ist die Standardeinstellung einer Firewall so, das diese Port offen ist. Aber irgendwie gefällt mir das nicht.

kberger
27.06.02, 16:17
Hallo Dennis,
die Firewall ist aktiv.
Hier wird ein Zugriff auf den Port 1214 versucht, der geblockt wird.

1. Interessant sind auf jeden Fall die Meldungen der Piortscanner. Man kann hier schon einiges ablesen.

2. Wichtig sind auch die Einstellungen der Firewall (ohne Kommentare).

Wenn du uns beides zur Verfügung stellst fällt die Hilfestellung schon etwas leichter.

Die Einstellungen der Firewall kannst du mit dem Befehl "iptables -L" überprüfen. Hier wird angezeigt welche Pakete durchgelassen werden oder nicht.

Gruß Klaus

Newbie2001
27.06.02, 17:52
das mit dem port 113 ist ein problem des firewall-skripts und nicht der konfiguration. über den port werden keine infos weitergegeben, da brauchst du keine angst haben, denn wenn du mal einen blick auf das Skript der SuSEfirewall2 unter /sbin/SuSEfirewall2 wirfst, dann wirst du entdecken, dass für den port 113 die Regel REJECT gesetzt ist wodurch die Pakete zumindest einmal unverändert zurückgeschickt wrden und nicht die Regel DROP, welche die Pakete ohne rückantwort verwirft. dies führt bei den meisten portscannern zu einer anderen meldung, da im Gegensatz zur Regel DROP bei der Regel REJECT ein Paket vom zu prüfenden Rechner zurückgeschickt wird, auch wenn dieses keine relevanten Informationen enthält. Somt weiß ein Angreifer zumindest dass dieser Port und dieser Rechner existiert, da er ja eine Antwort erhält, im Gegensatz zu DROP. Einfach die entsprechende Policy ändern und das wars. wenn du samba vor Zugriffen von aussen schützen willst, empfehle ich, samba an ein internes Inertface zu binden, z.B. mit dem Eintrag "interfaces = 192.168.1.0/24" in der smb.conf. Außerdem würde ich in der Firewall-config FW_SERVICE_SAMBA="no" stellen und FW_AUTOPROTECT_GLOBAL_SERVICES="yes" setzen. die samba ports 137 bis 139 würde ich nur für internen Zugriff freigeben.

Belkira
27.06.02, 19:19
dann wirst du entdecken, dass für den port 113 die Regel REJECT gesetzt ist wodurch die Pakete zumindest einmal unverändert zurückgeschickt wrden und nicht die Regel DROP, welche die Pakete ohne rückantwort verwirft.
Das wird extra mit REJECT (---reject-with tcp-reset bei iptables) gemacht, um beim Versenden von Mails ein Time-Out eines externen Mailserver bei seinem Ident Lookup zu vermeiden, der auftreten würde, wenn Port 113 eingehende Pakete einfach mit DROP schlucken und nicht beantworten würde.

Newbie2001
27.06.02, 20:12
aha, naja ich hab trotzdem auf DROP gesetzt, die mailserver werden scho überstehen.

Jinto
28.06.02, 12:10
Ein Droppen der Pakete führt u. a. dazu, dass das Mailabrufen länger dauert.


dann wirst du entdecken, dass für den port 113 die Regel REJECT gesetzt ist wodurch die Pakete zumindest einmal unverändert zurückgeschickt wrden und nicht die Regel DROP, welche die Pakete ohne rückantwort verwirft.
Die Pakete werden nicht unverändert zurückgeschickt, sondern der Sender erhält eine ICMP-Fehlermeldung

dies führt bei den meisten portscannern zu einer anderen meldung, da im Gegensatz zur Regel DROP bei der Regel REJECT ein Paket vom zu prüfenden Rechner zurückgeschickt wird, auch wenn dieses keine relevanten Informationen enthält.
Natürlich enthält es relevante Informationen. Sie auch GMX/Intel, etc Problematik mit DSL.

Somt weiß ein Angreifer zumindest dass dieser Port und dieser Rechner existiert, da er ja eine Antwort erhält, im Gegensatz zu DROP.
Du kannst dich im Internet nicht unsichtbar machen.
Droppen ist sinnlos und erhöht eigentlich nur unnötig den Traffik im Internet.

Dennis_S
28.06.02, 12:19
also lass ich das mit dem port 113 besser. Was ist schon ein sichtbarer Rechnername und local Domain? Solang niemand meine Festplatten leerräumen kann, ist alles in Ordnung! :p

Dennis_S
28.06.02, 12:26
Hier mal ein Screenshot des Onlinescanners. Der markierte Eintrag war vor der Installation von Samba nicht da. Alle relevanten Ports sind aber verschlossen! Meine Rechnerinformationen können gelesen werden, aber ein Zugriff auf den Samba Server ist nicht möglich!

Newbie2001
28.06.02, 13:36
na das is ja interessant, läuft das über NetBios oder was ?? wenn alle ports zu sind, darf es sowas eigentlich nicht geben.

Jinto
28.06.02, 14:11
NAchdem ich nun dein Scan Ergebnis gesehen habe. Würde ich wieder behaupten, du hast überhaupt keinen Paketfilter laufen. Allerdings kenne ich ja einen Ausschnitt aus deinen Logfiles und behaupte deswegen: du hast ihn einfach nur schlecht konfiguriert :p
Der Name deines Computers wird über den Netbios Port ausgelesen (andererseits, gibt dein MTA genau die gleichen Informationen her).

Welche Dienste willst du überhaupt für das Internet freigeben?
Welche Einstellungen hast du denn bei der fw2 gemacht?

kberger
28.06.02, 15:10
ich habe eben mein Netzwerk auf gleieche Weise scannen lassen. Neben Samba und Mailserver sind im Netzwerk diverse Dienste aktiv.
Es wurde kein Port erkannt und keine Daten aus dem Netzwerk dargestellt.

Ich gehe hier auch von einem Fehler in der Konfiguration der Firewall aus.

Wichtig sind einfach dieEinstellungen der fw2.

Gruß Klaus

Dennis_S
28.06.02, 15:12
Also das NetBios Port ist eigentlich zu. Falls es euch interesiert, hier meine SuSEfirewall2 Konfiguration:
#
# 1.)
# Should the Firewall be started?
#
# This setting is done via the links in the /etc/init.d/rc?.d runlevel
# directories, which can be tweaked with a runlevel editor (or manually)

#
# 2.)
# Which is the interface that points to the internet/untrusted networks?
#
# Enter all the network devices here which are untrusted.
#
# Choice: any number of devices, seperated by a space
# e.g. "eth0", "ippp0 ippp1 eth0:1"
#
FW_DEV_EXT="ppp0"

#
# 3.)
# Which is the interface that points to the internal network?
#
# Enter all the network devices here which are trusted.
# If you are not connected to a trusted network (e.g. you have just a
# dialup) leave this empty.
#
# Choice: leave empty or any number of devices, seperated by a space
# e.g. "tr0", "eth0 eth1 eth1:1" or ""
#
FW_DEV_INT="eth0"

#
# 4.)
# Which is the interface that points to the dmz or dialup network?
#
# Enter all the network devices here which point to the dmz/dialups.
# A "dmz" is a special, seperated network, which is only connected to the
# firewall, and should be reachable from the internet to provide services,
# e.g. WWW, Mail, etc. and hence are at risk from attacks.
# See /usr/share/doc/packages/SuSEfirewall2/EXAMPLES for an example.
#
# Special note: You have to configure FW_FORWARD to define the services
# which should be available to the internet and set FW_ROUTE to yes.
#
# Choice: leave empty or any number of devices, seperated by a space
# e.g. "tr0", "eth0 eth1 eth1:1" or ""
#
FW_DEV_DMZ=""

#
# 5.)
# Should routing between the internet, dmz and internal network be activated?
# REQUIRES: FW_DEV_INT or FW_DEV_DMZ
#
# You need only set this to yes, if you either want to masquerade internal
# machines or allow access to the dmz (or internal machines, but this is not
# a good idea). This option supersedes IP_FORWARD from
# /etc/sysconfig/network/options
#
# Setting this option one alone doesn't do anything. Either activate
# massquerading with FW_MASQUERADE below if you want to masquerade your
# internal network to the internet, or configure FW_FORWARD to define
# what is allowed to be forwarded!
#
# Choice: "yes" or "no", defaults to "no"
#
FW_ROUTE="yes"

#
# 6.)
# Do you want to masquerade internal networks to the outside?
# REQUIRES: FW_DEV_INT or FW_DEV_DMZ, FW_ROUTE
#
# "Masquerading" means that all your internal machines which use services on
# the internet seem to come from your firewall.
# Please note that it is more secure to communicate via proxies to the
# internet than masquerading. This option is required for FW_MASQ_NETS and
# FW_FORWARD_MASQ.
#
# Choice: "yes" or "no", defaults to "no"
#
FW_MASQUERADE="yes"
#
# You must also define on which interface(s) to masquerade on. This is
# normally your external device(s) to the internet.
# Most users can leave the default below.
#
# e.g. "ippp0" or "$FW_DEV_EXT"
FW_MASQ_DEV="$FW_DEV_EXT"
#
# Which internal computers/networks are allowed to access the internet
# directly (not via proxys on the firewall)?
# Only these networks will be allowed access and will be masqueraded!
#
# Choice: leave empty or any number of hosts/networks seperated by a space.
# Every host/network may get a list of allowed services, otherwise everything
# is allowed. A target network, protocol and service is appended by a comma to
# the host/network. e.g. "10.0.0.0/8" allows the whole 10.0.0.0 network with
# unrestricted access. "10.0.1.0/24,0/0,tcp,80 10.0.1.0/24,0/0tcp,21" allows
# the 10.0.1.0 network to use www/ftp to the internet.
# "10.0.1.0/24,tcp,1024:65535 10.0.2.0/24" is OK too.
# Set this variable to "0/0" to allow unrestricted access to the internet.
#
FW_MASQ_NETS="0/0"

#
# 7.)
# Do you want to protect the firewall from the internal network?
# REQUIRES: FW_DEV_INT
#
# If you set this to "yes", internal machines may only access services on
# the machine you explicitly allow. They will be also affected from the
# FW_AUTOPROTECT_SERVICES option.
# If you set this to "no", any user can connect (and attack) any service on
# the firewall.
#
# Choice: "yes" or "no", defaults to "yes"
#
# "yes" is a good choice
FW_PROTECT_FROM_INTERNAL="no"

#
# 8.)
# Do you want to autoprotect all running network services on the firewall?
#
# If set to "yes", all network access to services TCP and UDP on this machine
# will be prevented (except to those which you explicitly allow, see below:
# FW_SERVICES_{EXT,DMZ,INT}_{TCP,UDP})
#
# Choice: "yes" or "no", defaults to "yes"
#
FW_AUTOPROTECT_SERVICES="yes"

#
# 9.)
# Which services ON THE FIREWALL should be accessible from either the internet
# (or other untrusted networks), the dmz or internal (trusted networks)?
# (see no.13 & 14 if you want to route traffic through the firewall) XXX
#
# Enter all ports or known portnames below, seperated by a space.
# TCP services (e.g. SMTP, WWW) must be set in FW_SERVICES_*_TCP, and
# UDP services (e.g. syslog) must be set in FW_SERVICES_*_UDP.
# e.g. if a webserver on the firewall should be accessible from the internet:
# FW_SERVICES_EXT_TCP="www"
# e.g. if the firewall should receive syslog messages from the dmz:
# FW_SERVICES_DMZ_UDP="syslog"
# For IP protocols (like GRE for PPTP, or OSPF for routing) you need to set
# FW_SERVICES_*_IP with the protocol name or number (see /etc/protocols)
#
# Choice: leave empty or any number of ports, known portnames (from
# /etc/services) and port ranges seperated by a space. Port ranges are
# written like this: allow port 1 to 10 -> "1:10"
# e.g. "", "smtp", "123 514", "3200:3299", "ftp 22 telnet 512:514"
# For FW_SERVICES_*_IP enter the protocol name (like "igmp") or number ("2")
#
# Common: smtp domain
FW_SERVICES_EXT_TCP="ftp ftp-data smtp http ssh"
# Common: domain
FW_SERVICES_EXT_UDP=""
# Common: domain
# For VPN/Routing which END at the firewall!!
FW_SERVICES_EXT_IP=""
#
# Common: smtp domain
FW_SERVICES_DMZ_TCP=""
# Common: domain
FW_SERVICES_DMZ_UDP=""
# For VPN/Routing which END at the firewall!!
FW_SERVICES_DMZ_IP=""
#
# Common: ssh smtp domain
FW_SERVICES_INT_TCP=""
# Common: domain syslog
FW_SERVICES_INT_UDP=""
# For VPN/Routing which END at the firewall!!
FW_SERVICES_INT_IP=""

#
# 10.)
# Which services should be accessible from trusted hosts/nets?
#
# Define trusted hosts/networks (doesnt matter if they are internal or
# external) and the TCP and/or UDP services they are allowed to use.
# Please note that a trusted host/net is *not* allowed to ping the firewall
# until you set it to allow also icmp!
#
# Choice: leave FW_TRUSTED_NETS empty or any number of computers and/or
# networks, seperated by a space. e.g. "172.20.1.1 172.20.0.0/16"
# Optional, enter a protocol after a comma, e.g. "1.1.1.1,icmp"
# Optional, enter a port after a protocol, e.g. "2.2.2.2,tcp,22"
#
FW_TRUSTED_NETS=""

#
# 11.)
# How is access allowed to high (unpriviliged [above 1023]) ports?
#
# You may either allow everyone from anyport access to your highports ("yes"),
# disallow anyone ("no"), anyone who comes from a defined port (portnumber or
# known portname) [note that this is easy to circumvent!], or just your
# defined nameservers ("DNS").
# Note that you can't use rpc requests (e.g. rpcinfo, showmount) as root
# from a firewall using this script (well, you can if you include range
# 600:1023 in FW_SERVICES_EXT_UDP ...).
# Please note that with v2.1 "yes" is not mandatory for active FTP from
# the firewall anymore.
#
# Choice: "yes", "no", "DNS", portnumber or known portname, defaults to "no"
# if not set
#
# Common: "ftp-data", better is "yes" to be sure that everything else works :-(
FW_ALLOW_INCOMING_HIGHPORTS_TCP="ftp-data"
# Common: "DNS" or "domain ntp", better is "yes" to be sure ...
FW_ALLOW_INCOMING_HIGHPORTS_UDP="no"

#
# 12.)
# Are you running some of the services below?
# They need special attention - otherwise they won´t work!
#
# Set services you are running to "yes", all others to "no", defaults to "no"
# if not set.
#
FW_SERVICE_AUTODETECT="no"
# Autodetect the services below when starting
#
# If you are running bind/named set to yes. Remember that you have to open
# port 53 (or "domain") as udp/tcp to allow incoming queries.
# Also FW_ALLOW_INCOMING_HIGHPORTS_UDP needs to be "yes"
FW_SERVICE_DNS="yes"
#
# if you use dhclient to get an ip address you have to set this to "yes" !
FW_SERVICE_DHCLIENT="no"
#
# set to "yes" if this server is a DHCP server
FW_SERVICE_DHCPD="no"
#
# set to "yes" if this server is running squid. You still have to open the
# tcp port 3128 to allow remote access to the squid proxy service.
FW_SERVICE_SQUID="no"
#
# set to "yes" if this server is running a samba server. You still have to open
# the tcp port 139 to allow remote access to SAMBA.
FW_SERVICE_SAMBA="yes"

#
# 13.)
# Which services accessed from the internet should be allowed to the
# dmz (or internal network - if it is not masqueraded)?
# REQUIRES: FW_ROUTE
#
# With this option you may allow access to e.g. your mailserver. The
# machines must have valid, non-private, IP addresses which were assigned to
# you by your ISP. This opens a direct link to your network, so only use
# this option for access to your dmz!!!!
#
# Choice: leave empty (good choice!) or use the following explained syntax
# of forwarding rules, seperated each by a space.
# A forwarding rule consists of 1) source IP/net and 2) destination IP
# seperated by a comma. e.g. "1.1.1.1,2.2.2.2 3.3.3.3/16,4.4.4.4/24"
# Optional is a protocol, seperated by a comma, e.g. "5.5.5.5,6.6.6.6,igmp"
# Optional is a port after the protocol with a comma, e.g. "0/0,0/0,udp,514"
#
FW_FORWARD=""
# Beware to use this!

#
# 14.)
# Which services accessed from the internet should be allowed to masqueraded
# servers (on the internal network or dmz)?
# REQUIRES: FW_ROUTE
#
# With this option you may allow access to e.g. your mailserver. The
# machines must be in a masqueraded segment and may not have public IP addesses!
# Hint: if FW_DEV_MASQ is set to the external interface you have to set
# FW_FORWARD from internal to DMZ for the service as well to allow access
# from internal!
#
# Please note that this should *not* be used for security reasons! You are
# opening a hole to your precious internal network. If e.g. the webserver there
# is compromised - your full internal network is compromised!!
#
# Choice: leave empty (good choice!) or use the following explained syntax
# of forward masquerade rules, seperated each by a space.
# A forward masquerade rule consists of 1) source IP/net, 2) destination IP
# (dmz/intern), 3) a protocol (tcp/udp only!) and 4) destination port,
# seperated by a comma (","), e.g. "4.0.0.0/8,1.1.1.1,tcp,80"
# Optional is a port after the destination port, to redirect the request to
# a different destination port on the destination IP, e.g.
# "4.0.0.0/8,1.1.1.1,tcp,80,81"
#
FW_FORWARD_MASQ="0/0,192.168.0.2,udp,2234"
# Beware to use this!

#
# 15.)
# Which accesses to services should be redirected to a localport on the
# firewall machine?
#
# This can be used to force all internal users to surf via your squid proxy,
# or transparently redirect incoming webtraffic to a secure webserver.
#
# Choice: leave empty or use the following explained syntax of redirecting
# rules, seperated by a space.
# A redirecting rule consists of 1) source IP/net, 2) destination IP/net,
# 3) protocol (tcp or udp) 3) original destination port and 4) local port to
# redirect the traffic to, seperated by a colon. e.g.:
# "10.0.0.0/8,0/0,tcp,80,3128 0/0,172.20.1.1,tcp,80,8080"
#
FW_REDIRECT=""

#
# 16.)
# Which logging level should be enforced?
# You can define to log packets which were accepted or denied.
# You can also the set log level, the critical stuff or everything.
# Note that logging *_ALL is only for debugging purpose ...
#
# Choice: "yes" or "no", FW_LOG_*_CRIT defaults to "yes",
# FW_LOG_*_ALL defaults to "no"
#
FW_LOG_DROP_CRIT="yes"
#
FW_LOG_DROP_ALL="no"
#
FW_LOG_ACCEPT_CRIT="yes"
#
FW_LOG_ACCEPT_ALL="no"
#
# only change/activate this if you know what you are doing!
FW_LOG="--log-level warning --log-tcp-options --log-ip-option --log-prefix SuSE-FW"

#
# 17.)
# Do you want to enable additional kernel TCP/IP security features?
# If set to yes, some obscure kernel options are set.
# (icmp_ignore_bogus_error_responses, icmp_echoreply_rate,
# icmp_destunreach_rate, icmp_paramprob_rate, icmp_timeexeed_rate,
# ip_local_port_range, log_martians, mc_forwarding, mc_forwarding,
# rp_filter, routing flush)
# Tip: Set this to "no" until you have verified that you have got a
# configuration which works for you. Then set this to "yes" and keep it
# if everything still works. (It should!) ;-)
#
# Choice: "yes" or "no", defaults to "yes"
#
FW_KERNEL_SECURITY="yes"

#
# 18.)
# Keep the routing set on, if the firewall rules are unloaded?
# REQUIRES: FW_ROUTE
#
# If you are using diald, or automatic dialing via ISDN, if packets need
# to be sent to the internet, you need to turn this on. The script will then
# not turn off routing and masquerading when stopped.
# You *might* also need this if you have got a DMZ.
# Please note that this is *insecure*! If you unload the rules, but are still
# connected, you might your internal network open to attacks!
# The better solution is to remove "/sbin/SuSEfirewall2 stop" or
# "/sbin/init.d/firewall stop" from the ip-down script!
#
#
# Choices "yes" or "no", defaults to "no"
#
FW_STOP_KEEP_ROUTING_STATE="no"

#
# 19.)
# Allow (or don't) ICMP echo pings on either the firewall or the dmz from
# the internet? The internet option is for allowing the DMZ and the internal
# network to ping the internet.
# REQUIRES: FW_ROUTE for FW_ALLOW_PING_DMZ and FW_ALLOW_PING_EXT
#
# Choice: "yes" or "no", defaults to "no" if not set
#
FW_ALLOW_PING_FW="yes"
#
FW_ALLOW_PING_DMZ="no"
#
FW_ALLOW_PING_EXT="no"

##
# END of rc.firewall
##

# #
#-------------------------------------------------------------------------#
# #
# EXPERT OPTIONS - all others please don't change these! #
# #
#-------------------------------------------------------------------------#
# #

#
# 20.)
# Allow (or don't) ICMP time-to-live-exceeded to be send from your firewall.
# This is used for traceroutes to your firewall (or traceroute like tools).
#
# Please note that the unix traceroute only works if you say "yes" to
# FW_ALLOW_INCOMING_HIGHPORTS_UDP, and windows traceroutes only if you say
# additionally "yes" to FW_ALLOW_PING_FW
#
# Choice: "yes" or "no", defaults to "no" if not set.
#
FW_ALLOW_FW_TRACEROUTE="yes"

#
# 21.)
# Allow ICMP sourcequench from your ISP?
#
# If set to yes, the firewall will notice when connection is choking, however
# this opens yourself to a denial of service attack. Choose your poison.
#
# Choice: "yes" or "no", defaults to "yes"
#
FW_ALLOW_FW_SOURCEQUENCH="yes"

#
# 22.)
# Allow/Ignore IP Broadcasts?
#
# If set to yes, the firewall will not filter broadcasts by default.
# This is needed e.g. for Netbios/Samba, RIP, OSPF where the broadcast
# option is used.
# If you do not want to allow them however ignore the annoying log entries,
# set FW_IGNORE_FW_BROADCAST to yes.
#
# Choice: "yes" or "no", defaults to "no" if not set.
#
FW_ALLOW_FW_BROADCAST="no"
#
FW_IGNORE_FW_BROADCAST="yes"

#
# 23.)
# Allow same class routing per default?
# REQUIRES: FW_ROUTE
#
# Do you want to allow routing between interfaces of the same class
# (e.g. between all internet interfaces, or all internal network interfaces)
# be default (so without the need setting up FW_FORWARD definitions)?
#
# Choice: "yes" or "no", defaults to "no"
#
FW_ALLOW_CLASS_ROUTING="no"

#
# 25.)
# Do you want to load customary rules from a file?
#
# This is really an expert option. NO HELP WILL BE GIVEN FOR THIS!
# READ THE EXAMPLE CUSTOMARY FILE AT /etc/sysconfig/scripts/SuSEfirewall2-custom
#
#FW_CUSTOMRULES="/etc/sysconfig/scripts/SuSEfirewall2-custom"


Folgende Service sollen im Internet verfügbar sein: http, ftp, smtp, pop3, ssh und ein Portforwarding an einen Gameserver in der LAN (UDP 2234 -> 192.168.0.2)
Enstprechend ist meine Firewall konfiguriert und funktioniert auch alles so.

Helge
28.06.02, 15:21
Hi Dennis_S,

es gibt eine super einfache Lösung dafür!!! Gib in der smb.conf

interfaces = IP_AD_DR_ESS/SUB_NET_MASK
bind interfaces only = yes

ein und schon kann kein Scanner die NetBios Infos mehr lesen. Es geht hier weniger um die Ports - Deine Firewall kann dicht sein, aber diese Infos werden allen Rechnern (sofern in der smb.conf nicht geblockt) zur Verfügung gestellt!

Gruss


Helge

P.S. Diesen Trick habe ich hier im Forum gelernt! Danke nochmal an stefaan :D

Newbie2001
28.06.02, 15:22
1. FW_SERVICE_SAMBA="no"
2. FW_MASQ_NETS="192.168.0.0/24"
3.FW_SERVICES_INT_TCP="138:139"
4.FW_SERVICES_INT_UDP="137:138"

kberger
28.06.02, 16:28
Freigabe vom Intranet:

FW_SERVICES_INT_TCP="ftp ftp-data smtp http ssh ........"
oder wie beschrieben die Ports

FW_SERVICES_INT_UDP="domain"
für die Nameserveranfrage

Von innen geschützt
FW_PROTECT_FROM_INTERNAL="yes"
erlaubt sind nur die in den o. g. Freigaben erlaubten Dienste vom Intranet

Nameserver
FW_SERVICE_DNS="no"
oder willst du einen Nameserver anbieten?

Die Dienste mit der Angabe der Ports findest du unter /etc/services.

Ich hoffe es hilft.

Gruß Klaus

Dennis_S
29.06.02, 14:47
Original geschrieben von Newbie2001
3.FW_SERVICES_INT_TCP="138:139"
4.FW_SERVICES_INT_UDP="137:138"

Wofür ist das gut?

@kberger

Ich betreibe einen eigenen DNS Server nur fürs Intranet. Wegen dem Caching. Also brauch ich überhaupt die Weiterleitung von Nameserveranfragen?

kberger
29.06.02, 15:21
Bei ...DNS="yes" öffnest du deine Firewall um den DNS dem Internet zur Verfügung zu stellen. Wenn nicht ="no".

Wenn du deine Nameserver-Anfragen nur cachen willst, muss nscd gestartet werden, nicht aber named.

FW_SERVICES_INT_UDP="domain" gibt die Anfrage an den Nameserver ins Internet frei (Port 53) und erlaubt damit das Masquerading der Antwort an den anfragenden Host. Jeder Aufruf z. B. einer Internetsite fordert eine Nameserveranfrage zur Auflösung des Namens zur IP-Adresse. Diese Daten wirst du kaum alle in deinem internen Nameserver haben.
Wenn du in deinem Intranet Dienste wie einen Mailserver intern anbietest, kann es schon erforderlich sein, einen Nameserver für das Intranet aufzusetzen. Bei wenigen Adressen reichen aber schon die Dateien hosts und networks für die Auflösung.

Gruß Klaus

Dennis_S
30.06.02, 19:34
aha,..jetzt weiß ich schon mehr. Übrigens, mit den von euch genannten Einstellungen kann der Onlinescanner nun nicht mehr meine Rechnerinformationen lesen. :D Das freut' mich doch sehr! :)