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

Firewall

ddhp

Newbie
Hey Forumer,

ich habe da mal eine bescheidene Frage. Ich habe meine Firewall mit Yast2 konfiguriert und Linux als Router laufen.

Ich habe bei den Ports die ich in der Firewall offen lassen kann keinen eingetragen und angeklickt. Das bedeutet ja es müsste alles blockiert sein !

Wenn ich jetzt aber in meinen Browser gehe, kann ich zb. Google aufrufen..wie kann das sein.

Wenn ich mir die iptables ansehe dann ist die INPUT und OUTPUT auch nicht auf DROP !

Was ist falsch oder versteh ich da was falsch ?

Mein Linux Rechner soll einfach nur Routen !
 
A

Anonymous

Gast
hi
wie sehen dann deine ip tables aus?
Für einen "einfachen" router musst du normal nur forwarding aktvieren:
echo "1" > /proc/sys/net/ipv4/ip_forward
Um alle Ports von außen zu schließen gib folgendes ein:
iptables -I INPUT -i ppp0 -j REJECT
damit sind alle Ports von außen nicht erreichbar.
Um alles von INNEN zu schließen musst du
iptables -A name -i eth0 -j DROP
Aber dann würde er nicht mehr routen :wink:
Du kannst auch manuell bestimmte ports eingeben/schließen
eingeben

Gruß }-Tux-{
 
OP
D

ddhp

Newbie
Ich fänds ja geil wenn das jemand verstehen könnt ich nciht !
Wieso steht in der Input Accept all obwohl ich unter yast alles weggelassen hab ?



Chain INPUT (policy DROP)
target prot opt source destination
ACCEPT all -- anywhere anywhere
LOG udp -- anywhere anywhere udp dpts:netbios-ns
:netbios-dgm LOG level warning tcp-options ip-options prefix `SFW2-IN-ACC-SAMBA
'
ACCEPT udp -- anywhere anywhere state NEW,RELATED,E
STABLISHED udp dpts:netbios-ns:netbios-dgm
LOG all -- anywhere 255.255.255.255 LOG level warning t
cp-options ip-options prefix `SFW2-DROP-BCASTe '
DROP all -- anywhere 255.255.255.255
LOG all -- anywhere 100.0.0.255 LOG level warning t
cp-options ip-options prefix `SFW2-DROP-BCASTe '
DROP all -- anywhere 100.0.0.255
input_ext all -- anywhere anywhere
input_int all -- anywhere anywhere
LOG all -- anywhere linux.site LOG level warning t
cp-options ip-options prefix `SFW2-IN-ACC_DENIED_INT '
DROP all -- anywhere linux.site
LOG all -- anywhere anywhere LOG level warning t
cp-options ip-options prefix `SFW2-IN-ILL-TARGET '
DROP all -- anywhere anywhere

Chain FORWARD (policy DROP)
target prot opt source destination
TCPMSS tcp -- anywhere anywhere tcp flags:SYN,RST/S
YN TCPMSS clamp to PMTU
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere
forward_ext all -- anywhere anywhere
forward_int all -- anywhere anywhere
LOG all -- anywhere anywhere LOG level warning t
cp-options ip-options prefix `SFW2-FWD-ILL-ROUTING '
DROP all -- anywhere anywhere
ACCEPT all -- anywhere anywhere state NEW,RELATED,E
STABLISHED
LOG all -- anywhere anywhere LOG level warning t
cp-options ip-options prefix `SFW2-FORWARD-ERROR '

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere
LOG icmp -- anywhere anywhere icmp time-exceeded
LOG level warning tcp-options ip-options prefix `SFW2-OUT-TRACERT-ATTEMPT '
ACCEPT icmp -- anywhere anywhere icmp time-exceeded
ACCEPT icmp -- anywhere anywhere icmp port-unreachab
le
ACCEPT icmp -- anywhere anywhere icmp fragmentation-
needed
ACCEPT icmp -- anywhere anywhere icmp network-prohib
ited
ACCEPT icmp -- anywhere anywhere icmp host-prohibite
d
ACCEPT icmp -- anywhere anywhere icmp communication-
prohibited
DROP icmp -- anywhere anywhere icmp destination-un
reachable
ACCEPT all -- anywhere anywhere state NEW,RELATED,E
STABLISHED
LOG all -- anywhere anywhere LOG level warning t
cp-options ip-options prefix `SFW2-OUTPUT-ERROR '

Chain forward_dmz (0 references)
target prot opt source destination
LOG all -- anywhere linux.site LOG level warning t
cp-options ip-options prefix `SFW2-FWDdmz-DROP-CIRCUMV '
DROP all -- anywhere linux.site
LOG all -- anywhere linux.site LOG level warning t
cp-options ip-options prefix `SFW2-FWDdmz-DROP-CIRCUMV '
DROP all -- anywhere linux.site
LOG icmp -- anywhere anywhere state RELATED icmp
destination-unreachable LOG level warning tcp-options ip-options prefix `SFW2-FW
Ddmz-FWD-RELA '
LOG icmp -- anywhere anywhere state RELATED,ESTAB
LISHED icmp echo-reply LOG level warning tcp-options ip-options prefix `SFW2-FWD
dmz-FWD-RELA '
ACCEPT icmp -- anywhere anywhere state RELATED icmp
destination-unreachable
ACCEPT icmp -- anywhere anywhere state RELATED,ESTAB
LISHED icmp echo-reply
LOG all -- anywhere anywhere LOG level warning t
cp-options ip-options prefix `SFW2-FWDdmz-ACC-MASQ '
ACCEPT all -- anywhere anywhere state NEW,RELATED,E
STABLISHED
LOG all -- anywhere anywhere LOG level warning t
cp-options ip-options prefix `SFW2-FWDdmz-ACC-MASQ '
ACCEPT all -- anywhere anywhere state RELATED,ESTAB
LISHED
LOG all -- anywhere anywhere LOG level warning t
cp-options ip-options prefix `SFW2-FWDdmz-DROP-DEFLT '
DROP all -- anywhere anywhere

Chain forward_ext (1 references)
target prot opt source destination
LOG all -- anywhere linux.site LOG level warning t
cp-options ip-options prefix `SFW2-FWDext-DROP-CIRCUMV '
DROP all -- anywhere linux.site
LOG icmp -- anywhere anywhere state RELATED icmp
destination-unreachable LOG level warning tcp-options ip-options prefix `SFW2-FW
Dext-FWD-RELA '
LOG icmp -- anywhere anywhere state RELATED,ESTAB
LISHED icmp echo-reply LOG level warning tcp-options ip-options prefix `SFW2-FWD
ext-FWD-RELA '
ACCEPT icmp -- anywhere anywhere state RELATED icmp
destination-unreachable
ACCEPT icmp -- anywhere anywhere state RELATED,ESTAB
LISHED icmp echo-reply
LOG all -- anywhere anywhere LOG level warning t
cp-options ip-options prefix `SFW2-FWDext-ACC-MASQ '
ACCEPT all -- anywhere anywhere state NEW,RELATED,E
STABLISHED
LOG all -- anywhere anywhere LOG level warning t
cp-options ip-options prefix `SFW2-FWDext-ACC-MASQ '
ACCEPT all -- anywhere anywhere state RELATED,ESTAB
LISHED
LOG all -- anywhere anywhere LOG level warning t
cp-options ip-options prefix `SFW2-FWDext-DROP-DEFLT '
DROP all -- anywhere anywhere

Chain forward_int (1 references)
target prot opt source destination
LOG all -- anywhere linux.site LOG level warning t
cp-options ip-options prefix `SFW2-FWDint-DROP-CIRCUMV '
DROP all -- anywhere linux.site
LOG icmp -- anywhere anywhere state RELATED icmp
destination-unreachable LOG level warning tcp-options ip-options prefix `SFW2-FW
Dint-FWD-RELA '
LOG icmp -- anywhere anywhere state RELATED,ESTAB
LISHED icmp echo-reply LOG level warning tcp-options ip-options prefix `SFW2-FWD
int-FWD-RELA '
ACCEPT icmp -- anywhere anywhere state RELATED icmp
destination-unreachable
ACCEPT icmp -- anywhere anywhere state RELATED,ESTAB
LISHED icmp echo-reply
LOG all -- anywhere anywhere LOG level warning t
cp-options ip-options prefix `SFW2-FWDint-ACC-MASQ '
ACCEPT all -- anywhere anywhere state NEW,RELATED,E
STABLISHED
LOG all -- anywhere anywhere LOG level warning t
cp-options ip-options prefix `SFW2-FWDint-ACC-MASQ '
ACCEPT all -- anywhere anywhere state RELATED,ESTAB
LISHED
LOG all -- anywhere anywhere LOG level warning t
cp-options ip-options prefix `SFW2-FWDint-DROP-DEFLT '
DROP all -- anywhere anywhere

Chain input_dmz (0 references)
target prot opt source destination
LOG icmp -- anywhere anywhere icmp echo-request L
OG level warning tcp-options ip-options prefix `SFW2-INdmz-ACC-PING '
ACCEPT icmp -- anywhere anywhere icmp echo-request
LOG icmp -- anywhere anywhere icmp echo-reply LOG
level warning tcp-options ip-options prefix `SFW2-INdmz-ACC-ICMP '
ACCEPT icmp -- anywhere anywhere state RELATED,ESTAB
LISHED icmp echo-reply
LOG icmp -- anywhere anywhere icmp destination-un
reachable LOG level warning tcp-options ip-options prefix `SFW2-INdmz-ACC-ICMP '

ACCEPT icmp -- anywhere anywhere state RELATED,ESTAB
LISHED icmp destination-unreachable
LOG icmp -- anywhere anywhere icmp time-exceeded
LOG level warning tcp-options ip-options prefix `SFW2-INdmz-ACC-ICMP '
ACCEPT icmp -- anywhere anywhere state RELATED,ESTAB
LISHED icmp time-exceeded
LOG icmp -- anywhere anywhere icmp parameter-prob
lem LOG level warning tcp-options ip-options prefix `SFW2-INdmz-ACC-ICMP '
ACCEPT icmp -- anywhere anywhere state RELATED,ESTAB
LISHED icmp parameter-problem
LOG icmp -- anywhere anywhere icmp timestamp-repl
y LOG level warning tcp-options ip-options prefix `SFW2-INdmz-ACC-ICMP '
ACCEPT icmp -- anywhere anywhere state RELATED,ESTAB
LISHED icmp timestamp-reply
LOG icmp -- anywhere anywhere icmp address-mask-r
eply LOG level warning tcp-options ip-options prefix `SFW2-INdmz-ACC-ICMP '
ACCEPT icmp -- anywhere anywhere state RELATED,ESTAB
LISHED icmp address-mask-reply
LOG icmp -- anywhere anywhere LOG level warning t
cp-options ip-options prefix `SFW2-INdmz-DROP-ICMP '
DROP icmp -- anywhere anywhere
LOG tcp -- anywhere anywhere tcp dpt:ident flags
:SYN,RST,ACK/SYN LOG level warning tcp-options ip-options prefix `SFW2-INdmz-REJ
ECT '
reject_func tcp -- anywhere anywhere tcp dpt:ident fla
gs:SYN,RST,ACK/SYN
LOG tcp -- anywhere anywhere tcp dpt:ssh flags:S
YN,RST,ACK/SYN LOG level warning tcp-options ip-options prefix `SFW2-INdmz-DROP
'
DROP tcp -- anywhere anywhere tcp dpt:ssh flags:S
YN,RST,ACK/SYN
LOG tcp -- anywhere anywhere tcp dpt:sunrpc flag
s:SYN,RST,ACK/SYN LOG level warning tcp-options ip-options prefix `SFW2-INdmz-DR
OP '
DROP tcp -- anywhere anywhere tcp dpt:sunrpc flag
s:SYN,RST,ACK/SYN
LOG tcp -- anywhere anywhere tcp dpt:swat flags:
SYN,RST,ACK/SYN LOG level warning tcp-options ip-options prefix `SFW2-INdmz-DROP
'
DROP tcp -- anywhere anywhere tcp dpt:swat flags:
SYN,RST,ACK/SYN
LOG tcp -- anywhere anywhere state RELATED,ESTAB
LISHED LOG level warning tcp-options ip-options prefix `SFW2-INdmz-ACC-HiTCP '
ACCEPT tcp -- anywhere anywhere state RELATED,ESTAB
LISHED
LOG udp -- anywhere anywhere LOG level warning t
cp-options ip-options prefix `SFW2-INdmz-ACC-HiUDP '
ACCEPT udp -- anywhere anywhere state RELATED,ESTAB
LISHED
LOG udp -- anywhere anywhere udp dpt:ssh state N
EW LOG level warning tcp-options ip-options prefix `SFW2-INdmz-DROP '
DROP udp -- anywhere anywhere udp dpt:ssh state N
EW
LOG udp -- anywhere anywhere udp dpt:sunrpc stat
e NEW LOG level warning tcp-options ip-options prefix `SFW2-INdmz-DROP '
DROP udp -- anywhere anywhere udp dpt:sunrpc stat
e NEW
LOG udp -- anywhere anywhere udp dpt:sunrpc stat
e NEW LOG level warning tcp-options ip-options prefix `SFW2-INdmz-DROP '
DROP udp -- anywhere anywhere udp dpt:sunrpc stat
e NEW
LOG udp -- anywhere anywhere udp dpt:ntp state N
EW LOG level warning tcp-options ip-options prefix `SFW2-INdmz-DROP '
DROP udp -- anywhere anywhere udp dpt:ntp state N
EW
LOG udp -- anywhere anywhere udp dpt:ntp state N
EW LOG level warning tcp-options ip-options prefix `SFW2-INdmz-DROP '
DROP udp -- anywhere anywhere udp dpt:ntp state N
EW
LOG udp -- anywhere anywhere udp dpt:netbios-ns
state NEW LOG level warning tcp-options ip-options prefix `SFW2-INdmz-DROP '
DROP udp -- anywhere anywhere udp dpt:netbios-ns
state NEW
LOG udp -- anywhere anywhere udp dpt:netbios-dgm
state NEW LOG level warning tcp-options ip-options prefix `SFW2-INdmz-DROP '
DROP udp -- anywhere anywhere udp dpt:netbios-dgm
state NEW
LOG udp -- anywhere anywhere udp dpt:smpnameres
state NEW LOG level warning tcp-options ip-options prefix `SFW2-INdmz-DROP '
DROP udp -- anywhere anywhere udp dpt:smpnameres
state NEW
LOG all -- anywhere anywhere LOG level warning t
cp-options ip-options prefix `SFW2-INdmz-DROP-DEFLT '
DROP all -- anywhere anywhere

Chain input_ext (1 references)
target prot opt source destination
LOG icmp -- anywhere anywhere icmp source-quench
LOG level warning tcp-options ip-options prefix `SFW2-INext-ACC-SOURCEQUENCH '
ACCEPT icmp -- anywhere anywhere icmp source-quench
LOG icmp -- anywhere anywhere icmp echo-request L
OG level warning tcp-options ip-options prefix `SFW2-INext-ACC-PING '
ACCEPT icmp -- anywhere anywhere icmp echo-request
LOG icmp -- anywhere anywhere icmp echo-reply LOG
level warning tcp-options ip-options prefix `SFW2-INext-ACC-ICMP '
ACCEPT icmp -- anywhere anywhere state RELATED,ESTAB
LISHED icmp echo-reply
LOG icmp -- anywhere anywhere icmp destination-un
reachable LOG level warning tcp-options ip-options prefix `SFW2-INext-ACC-ICMP '

ACCEPT icmp -- anywhere anywhere state RELATED,ESTAB
LISHED icmp destination-unreachable
LOG icmp -- anywhere anywhere icmp time-exceeded
LOG level warning tcp-options ip-options prefix `SFW2-INext-ACC-ICMP '
ACCEPT icmp -- anywhere anywhere state RELATED,ESTAB
LISHED icmp time-exceeded
LOG icmp -- anywhere anywhere icmp parameter-prob
lem LOG level warning tcp-options ip-options prefix `SFW2-INext-ACC-ICMP '
ACCEPT icmp -- anywhere anywhere state RELATED,ESTAB
LISHED icmp parameter-problem
LOG icmp -- anywhere anywhere icmp timestamp-repl
y LOG level warning tcp-options ip-options prefix `SFW2-INext-ACC-ICMP '
ACCEPT icmp -- anywhere anywhere state RELATED,ESTAB
LISHED icmp timestamp-reply
LOG icmp -- anywhere anywhere icmp address-mask-r
eply LOG level warning tcp-options ip-options prefix `SFW2-INext-ACC-ICMP '
ACCEPT icmp -- anywhere anywhere state RELATED,ESTAB
LISHED icmp address-mask-reply
LOG icmp -- anywhere anywhere LOG level warning t
cp-options ip-options prefix `SFW2-INext-DROP-ICMP '
DROP icmp -- anywhere anywhere
LOG tcp -- anywhere anywhere tcp dpt:ident flags
:SYN,RST,ACK/SYN LOG level warning tcp-options ip-options prefix `SFW2-INext-REJ
ECT '
reject_func tcp -- anywhere anywhere tcp dpt:ident fla
gs:SYN,RST,ACK/SYN
LOG tcp -- anywhere anywhere tcp dpt:ssh flags:S
YN,RST,ACK/SYN LOG level warning tcp-options ip-options prefix `SFW2-INext-DROP
'
DROP tcp -- anywhere anywhere tcp dpt:ssh flags:S
YN,RST,ACK/SYN
LOG tcp -- anywhere anywhere tcp dpt:sunrpc flag
s:SYN,RST,ACK/SYN LOG level warning tcp-options ip-options prefix `SFW2-INext-DR
OP '
DROP tcp -- anywhere anywhere tcp dpt:sunrpc flag
s:SYN,RST,ACK/SYN
LOG tcp -- anywhere anywhere tcp dpt:swat flags:
SYN,RST,ACK/SYN LOG level warning tcp-options ip-options prefix `SFW2-INext-DROP
'
DROP tcp -- anywhere anywhere tcp dpt:swat flags:
SYN,RST,ACK/SYN
LOG tcp -- anywhere anywhere state RELATED,ESTAB
LISHED LOG level warning tcp-options ip-options prefix `SFW2-INext-ACC-HiTCP '
ACCEPT tcp -- anywhere anywhere state RELATED,ESTAB
LISHED
LOG udp -- anywhere anywhere LOG level warning t
cp-options ip-options prefix `SFW2-INext-ACC-HiUDP '
ACCEPT udp -- anywhere anywhere state RELATED,ESTAB
LISHED
LOG udp -- anywhere anywhere udp dpt:ssh state N
EW LOG level warning tcp-options ip-options prefix `SFW2-INext-DROP '
DROP udp -- anywhere anywhere udp dpt:ssh state N
EW
LOG udp -- anywhere anywhere udp dpt:sunrpc stat
e NEW LOG level warning tcp-options ip-options prefix `SFW2-INext-DROP '
DROP udp -- anywhere anywhere udp dpt:sunrpc stat
e NEW
LOG udp -- anywhere anywhere udp dpt:sunrpc stat
e NEW LOG level warning tcp-options ip-options prefix `SFW2-INext-DROP '
DROP udp -- anywhere anywhere udp dpt:sunrpc stat
e NEW
LOG udp -- anywhere anywhere udp dpt:ntp state N
EW LOG level warning tcp-options ip-options prefix `SFW2-INext-DROP '
DROP udp -- anywhere anywhere udp dpt:ntp state N
EW
LOG udp -- anywhere anywhere udp dpt:ntp state N
EW LOG level warning tcp-options ip-options prefix `SFW2-INext-DROP '
DROP udp -- anywhere anywhere udp dpt:ntp state N
EW
LOG udp -- anywhere anywhere udp dpt:ntp state N
EW LOG level warning tcp-options ip-options prefix `SFW2-INext-DROP '
DROP udp -- anywhere anywhere udp dpt:ntp state N
EW
LOG udp -- anywhere anywhere udp dpt:netbios-ns
state NEW LOG level warning tcp-options ip-options prefix `SFW2-INext-DROP '
DROP udp -- anywhere anywhere udp dpt:netbios-ns
state NEW
LOG udp -- anywhere anywhere udp dpt:netbios-dgm
state NEW LOG level warning tcp-options ip-options prefix `SFW2-INext-DROP '
DROP udp -- anywhere anywhere udp dpt:netbios-dgm
state NEW
LOG udp -- anywhere anywhere udp dpt:smpnameres
state NEW LOG level warning tcp-options ip-options prefix `SFW2-INext-DROP '
DROP udp -- anywhere anywhere udp dpt:smpnameres
state NEW
LOG udp -- anywhere anywhere udp dpts:61000:6509
5 LOG level warning tcp-options ip-options prefix `SFW2-INext-ACC-MASQ '
ACCEPT udp -- anywhere anywhere state ESTABLISHED u
dp dpts:61000:65095
LOG all -- anywhere anywhere LOG level warning t
cp-options ip-options prefix `SFW2-INext-DROP-DEFLT '
DROP all -- anywhere anywhere

Chain input_int (1 references)
target prot opt source destination
LOG all -- anywhere anywhere LOG level warning t
cp-options ip-options prefix `SFW2-INint-ACC-ALL-INT '
ACCEPT all -- anywhere anywhere
LOG icmp -- anywhere anywhere icmp echo-request L
OG level warning tcp-options ip-options prefix `SFW2-INint-ACC-PING '
ACCEPT icmp -- anywhere anywhere icmp echo-request
LOG icmp -- anywhere anywhere icmp echo-reply LOG
level warning tcp-options ip-options prefix `SFW2-INint-ACC-ICMP '
ACCEPT icmp -- anywhere anywhere state RELATED,ESTAB
LISHED icmp echo-reply
LOG icmp -- anywhere anywhere icmp destination-un
reachable LOG level warning tcp-options ip-options prefix `SFW2-INint-ACC-ICMP '

ACCEPT icmp -- anywhere anywhere state RELATED,ESTAB
LISHED icmp destination-unreachable
LOG icmp -- anywhere anywhere icmp time-exceeded
LOG level warning tcp-options ip-options prefix `SFW2-INint-ACC-ICMP '
ACCEPT icmp -- anywhere anywhere state RELATED,ESTAB
LISHED icmp time-exceeded
LOG icmp -- anywhere anywhere icmp parameter-prob
lem LOG level warning tcp-options ip-options prefix `SFW2-INint-ACC-ICMP '
ACCEPT icmp -- anywhere anywhere state RELATED,ESTAB
LISHED icmp parameter-problem
LOG icmp -- anywhere anywhere icmp timestamp-repl
y LOG level warning tcp-options ip-options prefix `SFW2-INint-ACC-ICMP '
ACCEPT icmp -- anywhere anywhere state RELATED,ESTAB
LISHED icmp timestamp-reply
LOG icmp -- anywhere anywhere icmp address-mask-r
eply LOG level warning tcp-options ip-options prefix `SFW2-INint-ACC-ICMP '
ACCEPT icmp -- anywhere anywhere state RELATED,ESTAB
LISHED icmp address-mask-reply
LOG icmp -- anywhere anywhere LOG level warning t
cp-options ip-options prefix `SFW2-INint-DROP-ICMP '
DROP icmp -- anywhere anywhere
LOG tcp -- anywhere anywhere tcp dpt:ident flags
:SYN,RST,ACK/SYN LOG level warning tcp-options ip-options prefix `SFW2-INint-REJ
ECT '
reject_func tcp -- anywhere anywhere tcp dpt:ident fla gs:SYN,RST,ACK/SYN
LOG tcp -- anywhere anywhere state RELATED,ESTAB LISHED LOG level warning tcp-options ip-options prefix `SFW2-INint-ACC-HiTCP '
ACCEPT tcp -- anywhere anywhere state RELATED,ESTAB LISHED
LOG udp -- anywhere anywhere LOG level warning t cp-options ip-options prefix `SFW2-INint-ACC-HiUDP '
ACCEPT udp -- anywhere anywhere state RELATED,ESTAB LISHED
LOG all -- anywhere anywhere LOG level warning t cp-options ip-options prefix `SFW2-INint-DROP-DEFLT '
DROP all -- anywhere anywhere

Chain reject_func (3 references)
target prot opt source destination
REJECT tcp -- anywhere anywhere reject-with tcp-res et
REJECT udp -- anywhere anywhere reject-with icmp-po rt-unreachable
REJECT all -- anywhere anywhere reject-with icmp-pr oto-unreachable



THX for coop
 
OP
D

ddhp

Newbie
Ich könnte ja hin gehen und sagen

iptables -P INPUT DROP
iptables -P OUTPUT DROP dann ist ja alles so wie ich es haben will.

Nur für mein Verständniss warum setz ich in der Firewall unter YAST alles auf sperren und die Input und Output ist offen ?
 
OP
D

ddhp

Newbie
Frage,

kann ich irgendwo ein Script hinlegen, was nach dem hochbooten der Firewall ausgeführt wird ?

Ich hab es schon mit boot.local versucht aber das wird vor der Firewall ausgeführt.

THX for coop !
 

ohweh

Newbie
Die YaST Firewall schützt
a) dein internes Netz vor Zugriffen aus dem Internet
b) schützt den Firewall Rechner selbst vor Zugriffen aus dem Internet
und falls die Checkbox "Vor internen Netz schützen" angekreuzt wurde, auch:
c) sich selbst vor Zugriffen aus dem internen Netz

D.h., dass du noch googlen kannst ist gewollt. Probier doch mal was passiert, wenn du "Vor internen Netz schützen" ankreuzt.

Die Ports die offen bleiben sollen, beziehen sich auf Ports, die von außen (Internet) erreichbar sein sollen. Sprich, wenn du dich per ssh aus dem Internet auf deine Firewall einloggen möchtest, dann musst du hier den ssh port auflassen (keine gute Idee übrigens ;-) ).

llp

Olli
 
OP
D

ddhp

Newbie
Nein das ist doch unlogisch. Wenn ich sage vor internen Netzwerk schützen, dann nimmt er ja keine Pakete mehr von meinem Windows client entgegen.

Dann Routet er ja nicht mehr. Er soll aber Routen und zwar nur das.

Und soviel ich weiß braucht ein Linux Router die Input und Output zum Routen nicht sondern nur die Forward.

Wenn ich die Input und die Output lösche geht weiterhin alles wunderbar mit dem Routen. Nur warum macht er das nicht von alleine wenn ich doch nichts angegeben habe unter yast ?

THX
 

ohweh

Newbie
ddhp schrieb:
Nein das ist doch unlogisch. Wenn ich sage vor internen Netzwerk schützen, dann nimmt er ja keine Pakete mehr von meinem Windows client entgegen.

Das stimmt. Das war auch nur zur Verdeutlichung gedacht, warum man auf www.google.de kommt: Weil von intern erstmal alle Zugriffe erlaubt sind.

ddhp schrieb:
Dann Routet er ja nicht mehr. Er soll aber Routen und zwar nur das.


Routen tut er doch. Oder?

ddhp schrieb:
Und soviel ich weiß braucht ein Linux Router die Input und Output zum Routen nicht sondern nur die Forward.

Wenn ich die Input und die Output lösche geht weiterhin alles wunderbar mit dem Routen. Nur warum macht er das nicht von alleine wenn ich doch nichts angegeben habe unter yast ?

THX

Ich habe leider gerade keine SUSE zur Verfügung zum Ausprobieren. Aber ich denke, In- und Output beziehen sich auf die Pakete aus dem internen Netz. Die werden erlaubt und das macht doch auch Sinn.

Oder ich habe das Problem noch nicht richtig verstanden. :)

llp

Olli
 
OP
D

ddhp

Newbie
Ich glaub ich habe mich falsch ausgedrückt und werde meine Frage mal ein wenig anders stellen.

Wie kann ich es erreichen, dass meine Iptables in der IN und Output chain gefläscht sind. Die Befehle kenne ich das ist kein Problem.

Nur wo kann ich diese hinschreiben, dass die Automatisch gestartet werden und zwar nach der Firewall. Es muss zuerst die Firewall schon gestartet sein und dann muss meine kleine Batch Datei ausgeführt werden aber wie mache ich das ?

Thanks for coop !

Weil in dem Firewall-Script von mir steht ja accept all in der INput und output chain und das ist mir ein zu großes Risiko !
 

ohweh

Newbie
Auszug aus der /etc/sysconfig/SuSEfirewall2:

Code:
# 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"
FW_CUSTOMRULES=""

D.h. du kannst dein Firewall Skript unter FW_CUSTOMRULES="" angeben.

Ist es das was du willst?

llp

Olli[/code]
 
OP
D

ddhp

Newbie
Jain, dass wäre schon nicht schlecht.

Aber die Firewall soll ruhig so starten wie sie Konfiguriert ist. Nur das ich am Ende hingehe und die Input und Output leere.

Und diese 2 Befehle um die Input und Output zu leeren wo kann ich diese hinlegen so dass die nach der firewall gestrtet werden.

Ich glaube oweh wenn ich Dich da richtig verstanden habe bei dem was du mir gerade gezeigt hast muss ich meine Firewall komplett selber erstellen. oder ?
 
OP
D

ddhp

Newbie
Ne falsch was ich gesagt habe aber ich habe mir die section mal angeschaut und das ist immer noch alles vor der wirklichen konfig der firewall.
 

ohweh

Newbie
ddhp schrieb:
Jain, dass wäre schon nicht schlecht.

Aber die Firewall soll ruhig so starten wie sie Konfiguriert ist. Nur das ich am Ende hingehe und die Input und Output leere.

Und diese 2 Befehle um die Input und Output zu leeren wo kann ich diese hinlegen so dass die nach der firewall gestrtet werden.

Ich glaube oweh wenn ich Dich da richtig verstanden habe bei dem was du mir gerade gezeigt hast muss ich meine Firewall komplett selber erstellen. oder ?

Die Grundkonfiguration kannst du schon mit YaST machen. YaST macht nichts anderes als die Datei /etc/sysconfig/SuSEfirewall2 anzupassen.

Du musst dann nur eine kleine Änderung in der Datei machen:
Die Zeile
Code:
FW_CUSTOMRULES=""
muss ersetzt werden durch
Code:
FW_CUSTOMRULES="/etc/sysconfig/scripts/SuSEfirewall2-custom"

Und in der Datei /etc/sysconfig/scripts/SuSEfirewall2-custom kannst du dann deine 2 zusätzlichen Regeln einfügen.

llp

ohweh
 
OP
D

ddhp

Newbie
Genau das ist es super nur in welcher Datei steht dieses FW customrules ? Wo ich den Pfad angebe ?

Und in diesem Customer Script kannst du mir sagen an welche stelle ich das hinschreiben muss damit das klappt ?
 

ohweh

Newbie
ddhp schrieb:
Genau das ist es super nur in welcher Datei steht dieses FW customrules ? Wo ich den Pfad angebe ?
/etc/sysconfig/SuSEfirewall2 (ist ziemlich groß, musst du die entsprechende Zeile suchen)

ddhp schrieb:
Und in diesem Customer Script kannst du mir sagen an welche stelle ich das hinschreiben muss damit das klappt ?
Na ja, an die Stelle, die du in der anderen Datei defininierst, in meinem Beispiel (aus dem letzten Beitrag) war es
/etc/sysconfig/scripts/SuSEfirewall2-custom

llp

Olli
 
Oben