26 สิงหาคม, 2005 - 18:34 — aums
มีโอกาศเข้าอบรมโรงเรียนในฝัน แล้วจะใช้ linux tle แต่่เครื่องลูกออกเนท ไม่ได้ ค้องเซ็ต browser proxy ถ้าไม่อยากไปเซ็ตที่เครื่องลูกจะต้องแก้ตรงไหนบ้าง
squid.conf
http_port 8080
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
cache_dir ufs /var/spool/squid 1000 16 256
auth_param basic children 5
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 2 hours
auth_param basic casesensitive off
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
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 to_localhost dst 127.0.0.0/8
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
acl our_networks src 192.168.1.0/24 192.168.2.0/24
http_access allow our_networks
http_access allow localhost
http_access deny all
http_reply_access allow all
icp_access allow all
coredump_dir /var/spool/squid
httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on
visible_hostname proxy
sysctl.conf
# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and
# sysctl.conf(5) for more details.
# Controls IP packet forwarding
net.ipv4.ip_forward = 1
# Controls source route verification
net.ipv4.conf.default.rp_filter = 1
# Do not accept source routing
net.ipv4.conf.default.accept_source_route = 0
# Controls the System Request debugging functionality of the kernel
kernel.sysrq = 0
# Controls whether core dumps will append the PID to the core filename.
# Useful for debugging multi-threaded applications.
kernel.core_uses_pid = 1
dhcp.conf
ddns-update-style interim;
ignore client-updates;
subnet 192.168.1.0 netmask 255.255.255.0 {
# --- default gateway
option routers 192.168.1.1;
option subnet-mask 255.255.255.0;
option nis-domain "domain.org";
option domain-name "domain.org";
option domain-name-servers 202.44.204.36, 202.44.204.63;
option time-offset -18000; # Eastern Standard Time
# option ntp-servers 192.168.1.1;
# option netbios-name-servers 192.168.1.1;
# --- Selects point-to-point node (default is hybrid). Don't change this unless
# -- you understand Netbios very well
# option netbios-node-type 2;
range dynamic-bootp 192.168.1.11 192.168.1.254;
default-lease-time 21600;
max-lease-time 43200;
}
iptables
# Generated by iptables-save v1.2.11 on Mon Jan 17 14:36:06 2005
*filter
:INPUT ACCEPT [13:2383]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A FORWARD -s 192.168.1.0/255.255.255.0 -j ACCEPT
-A FORWARD -d 192.168.1.0/255.255.255.0 -j ACCEPT
-A FORWARD -j DROP
COMMIT
# Completed on Mon Jan 17 14:36:06 2005
# Generated by iptables-save v1.2.11 on Mon Jan 17 14:36:06 2005
*nat
:PREROUTING ACCEPT [42:6705]
:POSTROUTING ACCEPT [1:78]
:OUTPUT ACCEPT [1:78]
-A PREROUTING -i eth1 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 8080
-A POSTROUTING -d ! 192.168.1.0/255.255.255.0 -j MASQUERADE
COMMIT
# Completed on Mon Jan 17 14:36:06 2005
ทั้งหมดนี้ทางทีมงานทะเลได้เอื้อเฟื้อแก่ โรงเรียนในฝัน แต่ไม่ทราบใันติดปัญหาตรงไหนครับ ที่เราจะไม่ต้องไปตั้งที่เครื่องลูก ให้ทุกเครื่องออกเนทได้เลย
- อ่าน 467 ครั้ง
- not spam ()
ความคิดเห็นล่าสุด
8 นาที 34 วินาที ก่อน
14 hours 4 นาที ก่อน
14 hours 39 นาที ก่อน
15 hours 32 นาที ก่อน
18 hours 3 นาที ก่อน
18 hours 14 นาที ก่อน
19 hours 7 นาที ก่อน
19 hours 10 นาที ก่อน
19 hours 14 นาที ก่อน
19 hours 19 นาที ก่อน