LoginSignup
4
6

More than 5 years have passed since last update.

CentOS7でのFireWall設定

Last updated at Posted at 2015-11-16

CentOS7の環境をVagrantで作成し、その上でRailsを動作させる環境を構築する際にCentOS7のファイヤウォール設定のところでハマりました。

CentOS7ではデフォルトでiptablesが設定されているわけではなく、ファイヤウォールが設定されているので、vagrantで3000番のポートを指定しておいても最初ブラウザで表示されませんでした。

参考
http://stackoverflow.com/questions/24756240/how-can-i-use-iptables-on-centos-7

CentOS7ではデフォルトではiptablesではなくsystemctl firewallでファイヤウォールを設定するらしい。
なので、とりあえずファイヤウォールをStopさせてみたら、3000番でブラウザ表示されました。

systemctl mask firewalld
systemctl enable iptables
systemctl enable ip6tables
systemctl stop firewalld
systemctl start iptables
systemctl start ip6tables

最初からiptablesがある訳では無いんですね。。。

4
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
6