Difference between revisions of "OpenVZ iptables Active"

From MS Computech
Jump to: navigation, search
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
'''วิธีการ Active Firewall บน HN Guest OS OpenVZ'''
+
'''วิธีการ Active Firewall บน HN Guest OS OpenVZ'''<br />
 +
 
 
บนเครื่อง Host ต้อง Load mod  
 
บนเครื่อง Host ต้อง Load mod  
 
<pre>
 
<pre>
Line 6: Line 7:
 
modprobe xt_state
 
modprobe xt_state
 
</pre>
 
</pre>
แก้ไข Config file ของ HN โดยเพิ่ม
+
แก้ไข Config file ของ HN /etc/vz/conf/101.conf โดยเพิ่ม
 
<pre>
 
<pre>
IPTABLES="ipt_REJECT ipt_tos ipt_limit ipt_multiport iptable_filter iptable_mangle ipt_TCPMSS ipt_tcpmss ipt_ttl ipt_length ipt_state"
+
IPTABLES="ipt_REJECT ipt_tos ipt_limit ipt_multiport iptable_filter iptable_mangle ipt_TCPMSS ipt_tcpmss ipt_ttl ipt_length ipt_state ipt_nat ipt_MASQUERADE"
 
</pre>
 
</pre>
 
Restart HN
 
Restart HN

Latest revision as of 08:50, 6 September 2012

วิธีการ Active Firewall บน HN Guest OS OpenVZ

บนเครื่อง Host ต้อง Load mod

modprobe xt_tcpudp
modprobe ip_conntrack
modprobe xt_state

แก้ไข Config file ของ HN /etc/vz/conf/101.conf โดยเพิ่ม

IPTABLES="ipt_REJECT ipt_tos ipt_limit ipt_multiport iptable_filter iptable_mangle ipt_TCPMSS ipt_tcpmss ipt_ttl ipt_length ipt_state ipt_nat ipt_MASQUERADE"

Restart HN

vzctl restart 101

Source