Karena sudah lama tidak main routing-an di network, cari2 akhirnya ketemu resep dari anggota forum FreeBSD.
Sebagai contoh penulis buatkan data server gateway dan proxy server ;
Gateway : 192.168.0.1
Proxy : 192.168.0.2
Caranya sebagai berikut;
Pada Gateway/Firewall (192.168.0.1):
# sysctl -a | grep ip.redirect
net.inet.ip.redirect: 0
pf.conf on gateway (192.168.0.1):
pass in quick on $int_if route-to ($int_if 192.168.0.2) proto tcp from ! 192.168.0.2 to any port 80
On Proxy Server (192.168.0.2):
# sysctl -a | grep ip.redirect
net.inet.ip.redirect: 0
pf.conf (Proxy Server 192.168.0.2):
rdr inet proto tcp from ! 192.168.0.2 to any port www -> 192.168.0.2 port 3128
# tail -f /usr/local/squid/logs/access.log
192.168.0.200 - - [22/Jun/2010:07:10:29 -0300] "GET http://www.google-analytics.com/urchin.js HTTP/1.1" 200 7318 TCP_HIT:NONE
Smoga Bermanfaat.
sumber :
http://forums.freebsd.org/showthread.php?t=15218
No comments:
Post a Comment