iptables

Post Reply
Message
Author
Andreas

iptables

#1 Post by Andreas »

Hallo Leute,
ich habe ein script mit iptables-befehlen

ich will dem server nur ein paar sachen erlauben und den rest verbieten.

iptables ("einiges erlauben")
iptables -P INPUT DROP

oder muß das andersrum?
also erst
iptables INPUT DROP
...........

Michael Teffenhart

Re: iptables

#2 Post by Michael Teffenhart »

Hi

ich hab das so gelöst:

ich hab zuersteinmal alles verboten. Also wirklich alles in / mit sämtlichen Protokollen / Ports.
Danach hab ich das, was ich benötige, freigegeben.

Das Skript sieht bei mir so aus, dass ich zuerst die Freigaben zum ausführen habe, erst danach wird der rest gedropt.

iptables -A INPUT ... -j ACCEPT
iptables -A OUTPUT ... -j ACCEPT
...
...
iptables -A INPUT ...-p tcp -j DROP
iptables -A INPUT ...-p udp -j DROP
iptables -A OUTPUT ... -p tcp -j DROP
iptables -A OUTPUT ... -p udp -j DROP

Michael

Michael Teffenhart

Re: iptables

#3 Post by Michael Teffenhart »

Hi

ich hab das so gelöst:

ich hab zuersteinmal alles verboten. Also wirklich alles in / mit sämtlichen Protokollen / Ports.
Danach hab ich das, was ich benötige, freigegeben.

Das Skript sieht bei mir so aus, dass ich zuerst die Freigaben zum ausführen habe, erst danach wird der rest gedropt.

iptables -A INPUT ... -j ACCEPT
iptables -A OUTPUT ... -j ACCEPT
...
...
iptables -A INPUT ...-p tcp -j DROP
iptables -A INPUT ...-p udp -j DROP
iptables -A OUTPUT ... -p tcp -j DROP
iptables -A OUTPUT ... -p udp -j DROP

Michael

Andreas

Re: iptables

#4 Post by Andreas »

vielen Dank <img src="http://www.pl-forum.de/UltraBoard/Images/Happy.gif" border="0" align="middle"> <img src="http://www.pl-forum.de/UltraBoard/Images/Happy.gif" border="0" align="middle"> <img src="http://www.pl-forum.de/UltraBoard/Images/Happy.gif" border="0" align="middle">
jetzt ist der Groschen (Cent) gefallen

Post Reply