友情提示:欢迎光临!本地已启用二维码api网关,地址是https://api.slogra.com

iptables下开放ftp

post by rocdk890 / 2011-9-3 14:30 Saturday linux技术

这两天在给客户安装服务器时也顺便给他们使用iptables,不用不知道,一用才发现iptables还有很多东西可以学的,比如开放ftp
iptables
filter表的INPUT链的默认策略设为了DROP,其余的链均为ACCEPT该服务器即要作ftp服务器,也要连上别的ftp服务器。即是说要把源端口和目的端口都开放21才行:

iptables -A INPUT -p tcp –sp...

阅读全文>>

标签: iptables ftp vsftpd

评论(0) 引用(0) 浏览(7951)

单网卡squid 3.0+iptables做内网透明代理

post by rocdk890 / 2011-6-30 17:07 Thursday linux技术

 公司的网络管理,我想是每一个管理员的最大痛苦,什么什么部门不能得罪,什么什么部门要特权,管理员夹在中间受气不说,网络有问题还说你没有管理好,最近被烦得不行,直接做个透明代理来控制他们上网操作,好了,再抱怨下去可能说上一天也说不完,看教程吧.
 系统:centos 5.5
 ip:192.168.9.166

1.安装squid
这个我是直接yum安装的squid-3.0.STABLE25-1.el5

2.配置
cd /etc/squid/
rm -f squid.conf
vi squid.conf

squid.conf里的内容:

http_port 3128 transparent
cache_mem 64 MB
cache_swap_low 90
cache_swap_high 95
#maximum_object_size 5120 KB
#minimum_object_size 0 KB
maximum_object_size 4096 KB
maximum_object_size_in_memory 8 KB
cache_dir ufs /var/spool/squid 1024 16 256
cache_effective_user squid
cache_effective_group squid
access_log /var/log/squid/access.log squid
cache_log /var/log/squid/cache.log
cache_store_log /var/log/squid/store.log
refresh_pattern ^ftp:  1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern .  0 20% 4320
visible_hostname cdn
dns_nameservers 61.139.2.69
dns_nameservers 202.98.96.68
cache_mgr root
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
acl coach urlpath_regex coach
no_cache deny coach

阅读全文>>

标签: squid 透明代理 iptables

评论(0) 引用(0) 浏览(10203)