Showing posts with label ポート番号. Show all posts
Showing posts with label ポート番号. Show all posts

Tuesday, August 29, 2017

CentOS: iptables: Opening HTTP and HTTPS Ports

Command:

# diff /etc/sysconfig/iptables /etc/sysconfig/iptables.org


Result:

13,14d12
< -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
< -A INPUT -p tcp -m tcp --dport 443 -j ACCEPT


Command:

# service iptables restart


Result:

iptables: Setting chains to policy ACCEPT: filter          [  OK  ]
iptables: Flushing firewall rules:                         [  OK  ]
iptables: Unloading modules:                               [  OK  ]
iptables: Applying firewall rules:                         [  OK  ]