vendredi 26 juin 2015

Cent OS 7 iptables

hallo,

ich arbeite mich gerade etwas in CentOS ein das ja von haus aus mit firewalld kommt. da ich eher mit iptables vertraut bin deaktiviere ich den dienst firewalld und installiere iptables.

Code:

[root@rs000569 ~]# systemctl start iptables
[root@rs000569 ~]# systemctl start ip6tables
[root@rs000569 ~]# systemctl enable iptables
ln -s '/usr/lib/systemd/system/iptables.service' '/etc/systemd/system/basic.target.wants/iptables.service'
[root@rs000569 ~]# systemctl enable ip6tables
ln -s '/usr/lib/systemd/system/ip6tables.service' '/etc/systemd/system/basic.target.wants/ip6tables.service'
[root@rs000569 ~]# iptables-save > /etc/sysconfig/iptables
[root@rs000569 ~]# iptables -L
Chain INPUT (policy ACCEPT)
target    prot opt source              destination       
ACCEPT    all  --  anywhere            anywhere            state RELATED,ESTABLISHED
ACCEPT    icmp --  anywhere            anywhere           
ACCEPT    all  --  anywhere            anywhere           
ACCEPT    tcp  --  anywhere            anywhere            state NEW tcp dpt:ssh
REJECT    all  --  anywhere            anywhere            reject-with icmp-host-prohibited

Chain FORWARD (policy ACCEPT)
target    prot opt source              destination       
REJECT    all  --  anywhere            anywhere            reject-with icmp-host-prohibited

Chain OUTPUT (policy ACCEPT)
target    prot opt source              destination       
[root@rs000569 ~]# reboot

nachdem ich den reboot mache komme ich allerdings nicht mehr auf den server - weder ping noch ssh login - obwohl ja die default regeln der iptables oben das ganze erlauben müssten. auf dem server ist auch plesk installiert - kann es damit zusammenhängen - dort habe ich aber die firewall nicht aktiviert?

übers rescue komme ich auf den server - kann mir da auch jemand sagen wo ich den iptables dienst auskommentieren kann das der server zumindest wieder bootet? systemd - muss das im target file irgendwo auskommentiert werden? iptables.service?

danke an jeden der sich auch solchen anfänger fragen annimmt ...


Aucun commentaire:

Enregistrer un commentaire