28 August 2008
squid 透過プロキシ
ipfw の設定を単純にしてテストしたところうまくいった
squid設定
acl localhost src 127.0.0.1/255.255.255.255
acl localnet src 192.168.XXX.0/255.255.255.0
http_access allow localhost
http_access allow localnet
http_port 192.168.XXX.X:3128 transparent
firewallの設定
#!/bin/sh -
fwcmd="/sbin/ipfw -q"
${fwcmd} -f flush
${fwcmd} add 100 pass all from any to any via lo0
${fwcmd} add 200 deny all from any to 127.0.0.0/8
${fwcmd} add 300 deny ip from 127.0.0.0/8 to any
${fwcmd} add 400 pass ip from 192.168.XXX.X to any
${fwcmd} add 500 fwd 192.168.XXX.X,3128 tcp from 192.168.XXX.0/24 any to any 80
${fwcmd} add 65000 pass all from any to any
squid設定
acl localhost src 127.0.0.1/255.255.255.255
acl localnet src 192.168.XXX.0/255.255.255.0
http_access allow localhost
http_access allow localnet
http_port 192.168.XXX.X:3128 transparent
firewallの設定
#!/bin/sh -
fwcmd="/sbin/ipfw -q"
${fwcmd} -f flush
${fwcmd} add 100 pass all from any to any via lo0
${fwcmd} add 200 deny all from any to 127.0.0.0/8
${fwcmd} add 300 deny ip from 127.0.0.0/8 to any
${fwcmd} add 400 pass ip from 192.168.XXX.X to any
${fwcmd} add 500 fwd 192.168.XXX.X,3128 tcp from 192.168.XXX.0/24 any to any 80
${fwcmd} add 65000 pass all from any to any
TrackBack
トラックバックフォームComments
No comments yet
Add Comments
このBlogへコメントを追加するにはメンバーとしてログインしなければいけません。