Chia Sẽ Kinh Nghiệm Về IT



Tìm Kiếm Với Google
-


Gởi Ðề Tài Mới  Gửi trả lời
 
Công Cụ Xếp Bài
Tuổi 12-03-2011, 10:17 AM   #1
hoctinhoc
Guest
 
Trả Lời: n/a
Cài đặt thêm các modun NAT, ip_recent Iptables for parallels virtuozzo container

Cài đặt thêm các modun NAT, ipt_recent Iptables for parallels virtuozzo container



Để cài đặt thêm các modun Nat, ipt_recent,... cho Iptables trên vps of virtuozzo container các bạn làm như sau:

Trên Server Host bạn thêm dòng sau vào tập tin cấu hình VZ:


#vi /etc/vz/vz.conf


Thêm:



Mã:

 IPTABLES=”ip_tables ipt_state ipt_multiport iptable_filter ipt_limit  ipt_LOG ipt_REJECT ipt_REDIRECT ipt_conntrack ip_conntrack  ip_conntrack_ftp ipt_owner ipt_recent ipt_tos iptable_mangle iptable_nat  ipt_TCPMSS ipt_tcpmss ipt_ttl ipt_length ipt_MASQUERADE xt_connlimit”
Thực thi lần lượt các lệnh bên dưới nếu bạn không muốn phải restart lại Server Host


Mã:

 /sbin/modprobe ip_tables 
/sbin/modprobe ipt_state 
/sbin/modprobe ipt_multiport 
/sbin/modprobe iptable_filter 
/sbin/modprobe ipt_limit 
/sbin/modprobe ipt_LOG 
/sbin/modprobe ipt_REJECT 
/sbin/modprobe ipt_REDIRECT 
/sbin/modprobe ipt_conntrack 
/sbin/modprobe ip_conntrack 
/sbin/modprobe ip_conntrack_ftp 
/sbin/modprobe ipt_owner 
/sbin/modprobe ipt_recent 
/sbin/modprobe ipt_tos 
/sbin/modprobe iptable_mangle 
/sbin/modprobe iptable_nat 
/sbin/modprobe ipt_TCPMSS 
/sbin/modprobe ipt_tcpmss 
/sbin/modprobe ipt_ttl 
/sbin/modprobe ipt_length
/sbin/modprobe ipt_iprange
/sbin/modprobe ipt_MASQUERADE
/sbin/modprobe xt_connlimit
Trên Server Host: Thêm dòng sau vào tập tin cấu hình của Container mà bạn muốn: (/etc/vz/conf/<CTID>.conf)



vi /etc/vz/conf/110.conf


Thêm:


Mã:

 IPTABLES=”ip_tables ipt_state ipt_multiport iptable_filter ipt_limit  ipt_LOG ipt_REJECT ipt_REDIRECT ipt_conntrack ip_conntrack  ip_conntrack_ftp ipt_owner ipt_recent ipt_tos iptable_mangle iptable_nat  ipt_TCPMSS ipt_tcpmss ipt_ttl ipt_length ipt_MASQUERADE xt_connlimit”
Restart lại Container có ID: 110

Sau khi cài xong các bạn chạy lệnh bên dưới nếu thấy không báo lỗi tức là ok

Mã:
 iptables -A FORWARD -m recent  --rcheck --second 60 -j DROP
Chúc các bạn thành công!


  Trả lời ngay kèm theo trích dẫn này
The Following User Says Thank You to hoctinhoc For This Useful Post:
Gửi trả lời



Quyền Hạn Của Bạn
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is Mở
Hình Cảm xúc đang Mở
[IMG] đang Mở
Mã HTML đang Tắt




Bây giờ là 03:51 PM. Giờ GMT +7



Diễn đàn tin học QuantriNet
quantrinet.com | quantrimang.co.cc
Founded by Trương Văn Phương | Developed by QuantriNet's members.
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.