02.01.2016 Views

Linux

linux_admin_text-1.0.0_2

linux_admin_text-1.0.0_2

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

2.4 iptables <br />

<br />

INPUT<br />

OUTPUT<br />

FORWARD<br />

PREROUTING<br />

POSTROUTING<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

ACCEPT<br />

DROP<br />

REJECT [--reject-with ]<br />

LOG<br />

<br />

<br />

<br />

ICMP <br />

syslog <br />

2.4.5 iptables <br />

INPUT <br />

<br />

iptables -A INPUT -m tcp -p tcp --dport -j ACCEPT<br />

TCP 80 (HTTP) <br />

iptables <br />

REJECT <br />

<br />

/etc/sysconfig/iptables iptables <br />

<br />

# iptables -A INPUT -m tcp -p tcp --dport 80 -j ACCEPT<br />

# iptables -L<br />

Chain INPUT (policy ACCEPT)<br />

target prot opt source destination<br />

ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED<br />

ACCEPT icmp -- anywhere anywhere<br />

ACCEPT all -- anywhere anywhere<br />

ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh<br />

REJECT all -- anywhere anywhere reject-with icmp-host-prohibited <br />

ACCEPT tcp -- anywhere anywhere tcp dpt:http <br />

<br />

www.lpi.or.jp 58 (C) LPI-Japan

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!