このドキュメントで説明するソフトウェアは、Extended SupportまたはSustaining Supportのいずれかにあります。 詳細は、https://www.oracle.com/us/support/library/enterprise-linux-support-policies-069172.pdfを参照してください。
Oracleでは、このドキュメントに記載されているソフトウェアをできるだけ早くアップグレードすることをお薦めします。
チェーンにルールを挿入するには、iptables -Iコマンドを使用します。 たとえば、次のコマンドはINPUT
チェーンにルールを挿入して、ポート80でのTCPによるアクセスを許可します。
#iptables -I INPUT 4 -p tcp -m tcp --dport 80 -j ACCEPT
#iptables -L --line-numbers
Chain INPUT (policy ACCEPT) num target prot opt source destination 1 ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED 2 ACCEPT icmp -- anywhere anywhere 3 ACCEPT all -- anywhere anywhere 4 ACCEPT tcp -- anywhere anywhere tcp dpt:http 5 ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh 6 ACCEPT udp -- anywhere anywhere state NEW udp dpt:ipp 7 ACCEPT udp -- anywhere 224.0.0.251 state NEW udp dpt:mdns 8 ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ipp 9 ACCEPT udp -- anywhere anywhere state NEW udp dpt:ipp 10 REJECT all -- anywhere anywhere reject-with icmp-host-prohibited Chain FORWARD (policy ACCEPT) num target prot opt source destination 1 REJECT all -- anywhere anywhere reject-with icmp-host-prohibited Chain OUTPUT (policy ACCEPT) num target prot opt source destination
iptables -Lからの出力は、新しいエントリがルール4として挿入され、古いルール4から9は位置5から10に下げられたことを示します。 TCP宛先ポート80はhttp
で表され、/etc/services
ファイル内の次の定義に対応します(HTTPデーモンはポート80でクライアント・リクエストをリスニングします)。
http 80/tcp www www-http # WorldWideWeb HTTP