装的是rh9,用自带的SQUID,两块网卡eth0:192.168.0.32,eth1:192.168.1.32
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.0.32
NETMASK=255.255.255.0
GATEWAY=192.168.0.1
DEVICE=eth1
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.1.32
NETMASK=255.255.255.0
192.168.0这个网段能上网
我只想让192.168.1这个网段的机器能够通过其透明代理上网。
squid.conf文件设置如下:
http_port 192.168.1.32:3128
cache_mar root
cache_dir ufs /var/squid/var/cache 100 16 256
cache_mem 32 M
cache_swap_low 90
cache_swap_high 95
cache_access_log /var/squid/access.log
cache_log /var/squid/cache.log
cache_store_log /var/squid/store.log
visible_hostname rh9
client_netmask 255.255.255.255
httpd_accel_host rh9
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_user_host_header on
iptables -t nat -A PREROUTING -i eth1 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128
iptables -t nat -A PORTROUTING -s 192.168.1.0/24 -o eth0 -j SNAT --to 192.168.0.32
我把客户器的IP设成192.168.1.33,255.255.255.0,网关192.168.1.32,DNS202.106.0.20仍然无法上网,请问什么原因? |