سلام
من میخوام هم cache هم Firewall با 3 تا کارت شبکه رو یه سیستم بزارم و همچنین security شبکه رو هم فراهم کنم.
با این دستورهای پایین به نظر شما این کارا که تو بالا گفتم فراهم میشه؟
eth0 external
eth1 DMZ
eth2 Internal
iptables command
iptables -t nat -A POSTROUTING -i eth1 -s <dmzip> -o eth0 -j MASQUERADE
iptables -t nat -A POSTROUTING -i eth2 -s <internalip> -o eth0 -j MASQUERADE
iptables -t nat -A PREROUTING -p tcp -m tcp -s <internalip>/255.255.255.0 --dport 80 -j REDIRECT --to-port 3128
squid sample
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
ipcache_size 16384 #4096
fqdncache_size 16384 #4096
cache_dir aufs /cache 35000 16 256
visible_hostname hostname
cache_mgr webmaster
acl nimda1 urlpath_regex -i \.elm$
acl nimda2 urlpath_regex -i root.exe
acl nimda3 urlpath_regex -i cmd.exe
acl nimda4 urlpath_regex -i ^
http://.*www
acl nimda5 urlpath_regex -i readme.exe
acl nimda6 urlpath_regex -i default.id
acl nimda7 urlpath_regex -i :25
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl SSL_ports port 443 563
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 # https, snews
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl CONNECT method CONNECT
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost
http_access deny nimda1
http_access deny nimda2
http_access deny nimda3
http_access deny nimda4
http_access deny nimda5
http_access deny nimda6
http_access deny nimda7
http_access allow all
icp_access allow all
httpd_accel_port 80
httpd_accel_host virtual
httpd_accel_with_proxy on
httpd_accel_uses_host_header on
ie_refresh on
#snmp
acl snmppublic snmp_community public
snmp_access allow snmppublic all
snmp_incoming_address 0.0.0.0
snmp_outgoing_address 0.0.0.0
cache_mem 128 MB # 8 MB
maximum_object_size 1000 MB # 4096 KB
maximum_object_size_in_memory 256 KB # 8 KB
dns_nameservers 10.169.254.1 192.9.9.3
request_header_max_size 10000 KB # 10 KB
request_timeout 120 second # 30 seconds