VirtualBox 上にCentOS7.2 minimalをインストールして、
ファイアーウォールの設定をしようとしています。
が、いろいろと、ネット上の情報と違っていて気持ちがすっきりしないので
質問させて頂いてます。
事象
巷ではCentOS7にはfirewalldに置き換わったと出ておりますが、
コマンドが見つかりません。
iptablesなら動いているようでしたので、気持ちを切り替えて設定しようとしましたが、
設定ファイルが見つかりません。ファイルではなくてコマンドからやってしまえば出来なくもないですが、
なんだが気持ちがすっきりしません。
またその過程で、サービスのステータスを拾おうとしましたが、目的のサービスを見つけれませんでした。
質問内容
- firewalldを使用したい場合、別途yumを使ってインストールする必要があるのでしょうか。
- 標準で動いているように見えるiptablesの設定ファイルはどこに保存されているのでしょうか。
- firewalld、iptablesのサービスの確認方法としてはどうやってできるのでしょうか?
(元々firewalldが入っていないのでであれば、確認できないのは当たり前ですが、、、)
やったこと
パッケージの確認
# rpm -q firewalld パッケージ firewalld はインストールされていません。 # # yum provides /sbin/iptables 読み込んだプラグイン:fastestmirror Determining fastest mirrors * base: www.ftp.ne.jp * extras: www.ftp.ne.jp * updates: www.ftp.ne.jp iptables-1.4.21-16.el7.x86_64 : Tools for managing Linux kernel packet filtering capabilities リポジトリー : @anaconda 一致 : ファイル名 : /sbin/iptables # # rpm -q iptables iptables-1.4.21-16.el7.x86_64 # # yum provides /etc/sysconfig/iptables 読み込んだプラグイン:fastestmirror Loading mirror speeds from cached hostfile * base: www.ftp.ne.jp * extras: www.ftp.ne.jp * updates: www.ftp.ne.jp iptables-services-1.4.21-16.el7.x86_64 : iptables and ip6tables services for iptables リポジトリー : base 一致 : ファイル名 : /etc/sysconfig/iptables # # rpm -q iptables-services パッケージ iptables-services はインストールされていません。 #
サービスの検索
# systemctl | grep fire # # systemctl status firewalld ● firewalld.service Loaded: not-found (Reason: No such file or directory) Active: inactive (dead) # # systemctl | grep ipta #
/sbin 配下の確認
# ls -R /sbin | grep fire # # ls -R /sbin | grep iptab iptables iptables-restore iptables-save #
/usr/lib配下の確認
# ls /usr/lib | grep ire # # ls /etc | grep ire #
iptablesの設定ファイルの検索
# find / -type f -name "iptable*" /etc/sysconfig/iptables-config /etc/selinux/targeted/modules/active/modules/iptables.pp /etc/selinux/targeted/modules/tmp/modules/iptables.pp /usr/lib/modules/3.10.0-327.el7.x86_64/kernel/net/ipv4/netfilter/iptable_filter.ko /usr/lib/modules/3.10.0-327.el7.x86_64/kernel/net/ipv4/netfilter/iptable_mangle.ko /usr/lib/modules/3.10.0-327.el7.x86_64/kernel/net/ipv4/netfilter/iptable_nat.ko /usr/lib/modules/3.10.0-327.el7.x86_64/kernel/net/ipv4/netfilter/iptable_raw.ko /usr/lib/modules/3.10.0-327.el7.x86_64/kernel/net/ipv4/netfilter/iptable_security.ko /usr/share/man/man1/iptables-xml.1.gz /usr/share/man/man8/iptables-extensions.8.gz /usr/share/man/man8/iptables-restore.8.gz /usr/share/man/man8/iptables-save.8.gz /usr/share/man/man8/iptables.8.gz #
パッケージのインストール内容の確認
# head -50 anaconda-ks.cfg #version=DEVEL # System authorization information auth --enableshadow --passalgo=sha512 # Use CDROM installation media cdrom # Use graphical install graphical # Run the Setup Agent on first boot firstboot --enable # Keyboard layouts keyboard --vckeymap=jp --xlayouts='jp' # System language lang ja_JP.UTF-8 # Network information network --bootproto=dhcp --device=enp0s3 --onboot=off --ipv6=auto network --hostname=localhost.localdomain # Root password rootpw --iscrypted $6$vz1MgIngTE.aEkF6$0TU1ilFovj3cA22S2BLkzUx.b7vsn5nkJmIylAJArKX4y33Ge5qmYx3iAV1rME3CKOgjg3uY7mDXlLLCRAkcN/ # System timezone timezone Asia/Tokyo --isUtc # System bootloader configuration bootloader --append=" crashkernel=auto" --location=mbr --boot-drive=sda autopart --type=lvm # Partition clearing information clearpart --none --initlabel %packages @^minimal @core kexec-tools %end %addon com_redhat_kdump --enable --reserve-mb='auto' %end #
###補足情報(言語/FW/ツール等のバージョンなど)
項目 | 情報 |
---|---|
ゲストOS | CentOS7.2.1511 minimal 64bit |
isoイメージ | CentOS-7-x86_64-Minimal-1511.iso |
ホストOS | MacOSX |

回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。