ServersMan@VPSには、lokkit がインストールされていませんので、iptables および ip6tables の設定のために、lokkit をインストールして、設定まで行いたいと思います。
1.yumでパッケージ検索
[root ~]# yum provides */lokkit ←これで検索 Loaded plugins: downloadonly, fastestmirror Repository ‘vz-base’ is missing name in configuration, using id Repository ‘vz-updates’ is missing name in configuration, using id Loading mirror speeds from cached hostfile * addons: www.ftp.ne.jp * base: www.ftp.ne.jp * extras: www.ftp.ne.jp * updates: www.ftp.ne.jp system-config-securitylevel-tui-1.6.29.1-5.el5.i386 : A text interface for …: modifying the system security level Repo : base Matched from: Filename : /usr/sbin/lokkit
2.インストール
[root ~]# yum install system-config-securitylevel-tui-1.6.29.1-5.el5.i386 Loaded plugins: fastestmirror, priorities Loading mirror speeds from cached hostfile * addons: ftp.iij.ad.jp * base: ftp.iij.ad.jp * epel: ftp.riken.jp * extras: ftp.iij.ad.jp * rpmforge: ftp-stud.fht-esslingen.de * updates: ftp.iij.ad.jp 3653 packages excluded due to repository priority protections Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package system-config-securitylevel-tui.i386 0:1.6.29.1-5.el5 set to be updated --> Processing Dependency: iptables-ipv6 for package: system-config-securitylevel-tui --> Running transaction check ---> Package iptables-ipv6.i386 0:1.3.5-5.3.el5_4.1 set to be updated --> Finished Dependency Resolution Dependencies Resolved ================================================== Package Arch Version Repository Size ================================================== Installing: system-config-securitylevel-tui i386 1.6.29.1-5.el5 base 253 k Installing for dependencies: iptables-ipv6 i386 1.3.5-5.3.el5_4.1 base 161 k Transaction Summary ================================================== Install 2 Package(s) Upgrade 0 Package(s) Total download size: 414 k Is this ok [y/N]: y Downloading Packages: (1/2): iptables-ipv6-1.3.5-5.3.el5_4.1.i386.rpm | 161 kB 00:00 (2/2): system-config-securitylevel-tui-1.6.29.1-5.el5.i3 | 253 kB 00:00 -------------------------------------------------------------------------------- Total 1.9 MB/s | 414 kB 00:00 Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing : iptables-ipv6 1/2 Installing : system-config-securitylevel-tui 2/2 Installed: system-config-securitylevel-tui.i386 0:1.6.29.1-5.el5 Dependency Installed: iptables-ipv6.i386 0:1.3.5-5.3.el5_4.1 Complete!
3.iptables、ip6tablesの設定
[root ~]# lokkit
図1の画面が表示される。ここでは、まずSELinuxを無効にする。
その後、[カスタマイズ]までタブキーでカーソルを進めてENTER。
図2の画面で次のポートだけ開ける設定をして、[OK]でENTER。
- ポート80
- ポート443
- ポート3306(MySQL)
図1の画面に戻るので、そこで[OK]でENTER。
4.自動起動の確認
プロセスはip6tables
[root ~]# chkconfig --list | grep tables ip6tables 0:off 1:off 2:on 3:on 4:on 5:on 6:off iptables 0:off 1:off 2:on 3:on 4:on 5:on 6:off