PierreS
07.07.06, 07:46
Hallo,
ich hatte bisher noch nichts mit iptables zu tun. Nach einem Wechsel von einem vServer zu einem dedizierten habe ich anhand eines HowTos folgende Regeln erstellt:
iptables -nvL
Chain INPUT (policy DROP 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0
1046 131K ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
85 13284 interfaces all -- * * 0.0.0.0/0 0.0.0.0/0
78 12816 open all -- * * 0.0.0.0/0 0.0.0.0/0
2 112 REJECT tcp -- * * 0.0.0.0/0 0.0.0.0/0 reject-with tcp-reset
30 10020 REJECT udp -- * * 0.0.0.0/0 0.0.0.0/0 reject-with icmp-port-unreachable
Chain FORWARD (policy DROP 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 1067 packets, 637K bytes)
pkts bytes target prot opt in out source destination
Chain interfaces (1 references)
pkts bytes target prot opt in out source destination
7 468 ACCEPT all -- lo * 0.0.0.0/0 0.0.0.0/0
Chain open (1 references)
pkts bytes target prot opt in out source destination
1 60 ACCEPT tcp -- eth0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:512
26 1484 ACCEPT tcp -- eth0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:80
1 60 ACCEPT tcp -- eth0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:25
0 0 ACCEPT tcp -- eth0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:143
17 1020 ACCEPT tcp -- eth0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:443
0 0 ACCEPT tcp -- eth0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:465
0 0 ACCEPT tcp -- eth0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:993
0 0 ACCEPT tcp -- eth0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:5222
1 60 ACCEPT tcp -- eth0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:5223
0 0 ACCEPT tcp -- eth0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:5269
Ich habe bisher leider hauptsächlich Howtos für Clients oder HomeServer gefunden. Sind die Regeln oben sinnvoll und vor allem nicht gefährlich?
Erreichbar soll sein:
ssh (512)
http(s)
smtp(s)
imap(s)
jabber
ich hatte bisher noch nichts mit iptables zu tun. Nach einem Wechsel von einem vServer zu einem dedizierten habe ich anhand eines HowTos folgende Regeln erstellt:
iptables -nvL
Chain INPUT (policy DROP 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0
1046 131K ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
85 13284 interfaces all -- * * 0.0.0.0/0 0.0.0.0/0
78 12816 open all -- * * 0.0.0.0/0 0.0.0.0/0
2 112 REJECT tcp -- * * 0.0.0.0/0 0.0.0.0/0 reject-with tcp-reset
30 10020 REJECT udp -- * * 0.0.0.0/0 0.0.0.0/0 reject-with icmp-port-unreachable
Chain FORWARD (policy DROP 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 1067 packets, 637K bytes)
pkts bytes target prot opt in out source destination
Chain interfaces (1 references)
pkts bytes target prot opt in out source destination
7 468 ACCEPT all -- lo * 0.0.0.0/0 0.0.0.0/0
Chain open (1 references)
pkts bytes target prot opt in out source destination
1 60 ACCEPT tcp -- eth0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:512
26 1484 ACCEPT tcp -- eth0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:80
1 60 ACCEPT tcp -- eth0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:25
0 0 ACCEPT tcp -- eth0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:143
17 1020 ACCEPT tcp -- eth0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:443
0 0 ACCEPT tcp -- eth0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:465
0 0 ACCEPT tcp -- eth0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:993
0 0 ACCEPT tcp -- eth0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:5222
1 60 ACCEPT tcp -- eth0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:5223
0 0 ACCEPT tcp -- eth0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:5269
Ich habe bisher leider hauptsächlich Howtos für Clients oder HomeServer gefunden. Sind die Regeln oben sinnvoll und vor allem nicht gefährlich?
Erreichbar soll sein:
ssh (512)
http(s)
smtp(s)
imap(s)
jabber