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.

3.4 NTP <br />

3.4.5 <br />

NTP UDP 123 NTP <br />

iptables <br />

<br />

/etc/sysconfig/iptables iptables <br />

# vi /etc/sysconfig/iptables<br />

# Firewall configuration written by system-config-firewall<br />

# Manual customization of this file is not recommended.<br />

∗filter<br />

:INPUT ACCEPT [0:0]<br />

:FORWARD ACCEPT [0:0]<br />

:OUTPUT ACCEPT [0:0]<br />

-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT<br />

-A INPUT -p icmp -j ACCEPT<br />

-A INPUT -i lo -j ACCEPT<br />

-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT<br />

-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT<br />

-A INPUT -m state --state NEW -m udp -p udp --dport 123 -j ACCEPT <br />

-A INPUT -j REJECT --reject-with icmp-host-prohibited<br />

-A FORWARD -j REJECT --reject-with icmp-host-prohibited<br />

COMMIT<br />

service iptables <br />

# service iptables reload<br />

iptables: Trying to reload firewall rules: [ OK ]<br />

# iptables -L<br />

Chain INPUT (policy ACCEPT)<br />

target prot opt source destination<br />

<br />

ACCEPT udp -- anywhere anywhere state NEW udp dpt:ntp<br />

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

<br />

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

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

Saved successfully!

Ooh no, something went wrong!