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
...........
iptables
Re: iptables
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
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
Re: iptables
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
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
Re: iptables
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
jetzt ist der Groschen (Cent) gefallen