Script Server ( อีกตัว )
rc.firewall.local
# -------------------------------------------------------------
# Frox
# -------------------------------------------------------------
if [ -f /var/run/frox.pid ]; then
iptables -t nat -D PREROUTING -p tcp --destination-port 21 -j REDIRECT --to-port 2121 > /dev/null
iptables -t nat -I PREROUTING -p tcp --destination-port 21 -j REDIRECT --to-port 2121
# HipStreet for Frox
iptables -t nat -D PREROUTING -p tcp -d 58.97.46.0/24 --destination-port 8021 -j REDIRECT --to-port 2121 > /dev/null
iptables -t nat -I PREROUTING -p tcp -d 58.97.46.0/24 --destination-port 8021 -j REDIRECT --to-port 2121
fi
_____________________________________________________________________________________
Frox.conf
Port 2121
ResolvLoadHack wontresolve.doesntexist.abc
User frox
Group frox
WorkingDir /var/cache/frox
DontChroot Yes
LogLevel 0
LogFile /var/log/frox.log
XferLogging no
PidFile /var/run/frox.pid
BounceDefend
AllowNonASCII
ControlPorts 50000-50199
PassivePorts 50200-50399
ActivePorts 50400-50599
CacheModule local
# CacheModule http
HTTPProxy 127.0.0.1:3128
CacheSize 35000
MinCacheSize 0
CacheAll
DoNTP
NTPAddress 0.0.0.0:2121
# Timeout 300
MaxForks 60
MaxForksPerHost 10
ACL Allow * - *
_______________________________________________________________________________
squid.conf
shutdown_lifetime 5 second
icp_port 0
http_port 192.168.1.3:3128
tcp_outgoing_address 0.0.0.0
udp_incoming_address 0.0.0.0
udp_outgoing_address 255.255.255.255
icp_query_timeout 0
maximum_icp_query_timeout 9000
mcast_icp_query_timeout 9000
ftp_sanitycheck off
ftp_user user@domain.com
ftp_passive on
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
#umask 022
cache_effective_user squid
cache_effective_group squid
pid_filename /var/run/squid.pid
mime_table /etc/squid/mime.conf
cache_access_log /dev/null
cache_log /dev/null
cache_store_log none
ipcache_size 2048
ipcache_low 98
ipcache_high 99
fqdncache_size 4096
icp_hit_stale off
query_icmp on
test_reachability off
reload_into_ims on
vary_ignore_expire on
strip_query_terms off
offline_mode off
emulate_httpd_log off
log_ip_on_direct off
log_fqdn off
buffered_logs on
log_mime_hdrs off
log_icp_queries off
log_ip_on_direct on
forwarded_for off
acl all src 0.0.0.0/0.0.0.0
acl localhost src 127.0.0.1/255.255.255.255
acl All_Port port 1-65535
acl CONNECT method CONNECT
http_access allow All_Port
http_access allow CONNECT All_Port
http_access allow localhost
http_access allow all
icp_access allow all
maximum_object_size 50000 KB
minimum_object_size 0 KB
cache_swap_low 90
cache_swap_high 99
memory_pools off
cache_mem 256 MB
cache_dir ufs /var/spool/squid 1024 16 256
request_body_max_size 0 KB
reply_body_max_size 0 allow all
visible_hostname TrueFaster.com
httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on
httpd_accel_single_host off
#cache_peer proxy.csloxinfo.com parent 8080 8080 default no-query no-delay
memory_replacement_policy heap GDSF
cache_replacement_policy heap GDSF
ie_refresh on
balance_on_multiple_ip on
pipeline_prefetch on
dns_timeout 2 minutes
dns_nameservers 203.113.127.199 #สำหรับเน็ตทรูเท่านั้น
dns_nameservers 203.113.127.199 #สำหรับเน็ตทรูเท่านั้น
never_direct deny all
dns_retransmit_interval 5 seconds
dns_timeout 5 minutes
redirect_rewrites_host_header on
negative_ttl 5 minutes
positive_dns_ttl 6 hours
negative_dns_ttl 5 minutes
range_offset_limit 0 KB
quick_abort_min 0
quick_abort_max 0
quick_abort_pct 98
half_closed_clients off
#refresh_pattern ^ftp: 1440 20% 1440
#refresh_pattern ^gopher: 1440 0% 1440
#refresh_pattern . 20% 1440
#refresh_pattern ^http: 4320 20% 43200
#refresh_pattern -i \.(gif|jpg|jpeg|png|bmp|tif|xbm|tiff)$ 604800 20% 2419200
refresh_pattern \.gif 4320 50% 43200
refresh_pattern \.jpg 4320 50% 43200
refresh_pattern \.tif 4320 50% 43200
refresh_pattern ^ftp: 10080 95% 241920 reload-into-ims override-lastmod
refresh_pattern . 180 95% 120960 reload-into-ims override-lastmod
refresh_pattern ^http://*.cabal.asiasoft.co.th/.* 720 100% 4320
-------------------------------------------------------------------------
rc.firewall.local
# -------------------------------------------------------------
# Frox
# -------------------------------------------------------------
## เพิ่มคำสั่งใต้นี้เข้าไปนะครับ ### Edit BY Dj.BOM
iptables -t nat -I PREROUTING -d 202.43.34.110 -p tcp --dport 21 -j ACCEPT
# -------------------------------------------------------------
# Frox
# -------------------------------------------------------------
if [ -f /var/run/frox.pid ]; then
iptables -t nat -D PREROUTING -p tcp --destination-port 21 -j REDIRECT --to-port 2121 > /dev/null
iptables -t nat -I PREROUTING -p tcp --destination-port 21 -j REDIRECT --to-port 2121
# HipStreet for Frox
iptables -t nat -D PREROUTING -p tcp -d 58.97.46.0/24 --destination-port 8021 -j REDIRECT --to-port 2121 > /dev/null
iptables -t nat -I PREROUTING -p tcp -d 58.97.46.0/24 --destination-port 8021 -j REDIRECT --to-port 2121
fi
_____________________________________________________________________________________
Frox.conf
Port 2121
ResolvLoadHack wontresolve.doesntexist.abc
User frox
Group frox
WorkingDir /var/cache/frox
DontChroot Yes
LogLevel 0
LogFile /var/log/frox.log
XferLogging no
PidFile /var/run/frox.pid
BounceDefend
AllowNonASCII
ControlPorts 50000-50199
PassivePorts 50200-50399
ActivePorts 50400-50599
CacheModule local
# CacheModule http
HTTPProxy 127.0.0.1:3128
CacheSize 35000
MinCacheSize 0
CacheAll
DoNTP
NTPAddress 0.0.0.0:2121
# Timeout 300
MaxForks 60
MaxForksPerHost 10
ACL Allow * - *
_______________________________________________________________________________
squid.conf
shutdown_lifetime 5 second
icp_port 0
http_port 192.168.1.3:3128
tcp_outgoing_address 0.0.0.0
udp_incoming_address 0.0.0.0
udp_outgoing_address 255.255.255.255
icp_query_timeout 0
maximum_icp_query_timeout 9000
mcast_icp_query_timeout 9000
ftp_sanitycheck off
ftp_user user@domain.com
ftp_passive on
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
#umask 022
cache_effective_user squid
cache_effective_group squid
pid_filename /var/run/squid.pid
mime_table /etc/squid/mime.conf
cache_access_log /dev/null
cache_log /dev/null
cache_store_log none
ipcache_size 2048
ipcache_low 98
ipcache_high 99
fqdncache_size 4096
icp_hit_stale off
query_icmp on
test_reachability off
reload_into_ims on
vary_ignore_expire on
strip_query_terms off
offline_mode off
emulate_httpd_log off
log_ip_on_direct off
log_fqdn off
buffered_logs on
log_mime_hdrs off
log_icp_queries off
log_ip_on_direct on
forwarded_for off
acl all src 0.0.0.0/0.0.0.0
acl localhost src 127.0.0.1/255.255.255.255
acl All_Port port 1-65535
acl CONNECT method CONNECT
http_access allow All_Port
http_access allow CONNECT All_Port
http_access allow localhost
http_access allow all
icp_access allow all
maximum_object_size 50000 KB
minimum_object_size 0 KB
cache_swap_low 90
cache_swap_high 99
memory_pools off
cache_mem 256 MB
cache_dir ufs /var/spool/squid 1024 16 256
request_body_max_size 0 KB
reply_body_max_size 0 allow all
visible_hostname TrueFaster.com
httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on
httpd_accel_single_host off
#cache_peer proxy.csloxinfo.com parent 8080 8080 default no-query no-delay
memory_replacement_policy heap GDSF
cache_replacement_policy heap GDSF
ie_refresh on
balance_on_multiple_ip on
pipeline_prefetch on
dns_timeout 2 minutes
dns_nameservers 203.113.127.199 #สำหรับเน็ตทรูเท่านั้น
dns_nameservers 203.113.127.199 #สำหรับเน็ตทรูเท่านั้น
never_direct deny all
dns_retransmit_interval 5 seconds
dns_timeout 5 minutes
redirect_rewrites_host_header on
negative_ttl 5 minutes
positive_dns_ttl 6 hours
negative_dns_ttl 5 minutes
range_offset_limit 0 KB
quick_abort_min 0
quick_abort_max 0
quick_abort_pct 98
half_closed_clients off
#refresh_pattern ^ftp: 1440 20% 1440
#refresh_pattern ^gopher: 1440 0% 1440
#refresh_pattern . 20% 1440
#refresh_pattern ^http: 4320 20% 43200
#refresh_pattern -i \.(gif|jpg|jpeg|png|bmp|tif|xbm|tiff)$ 604800 20% 2419200
refresh_pattern \.gif 4320 50% 43200
refresh_pattern \.jpg 4320 50% 43200
refresh_pattern \.tif 4320 50% 43200
refresh_pattern ^ftp: 10080 95% 241920 reload-into-ims override-lastmod
refresh_pattern . 180 95% 120960 reload-into-ims override-lastmod
refresh_pattern ^http://*.cabal.asiasoft.co.th/.* 720 100% 4320
-------------------------------------------------------------------------
rc.firewall.local
# -------------------------------------------------------------
# Frox
# -------------------------------------------------------------
## เพิ่มคำสั่งใต้นี้เข้าไปนะครับ ### Edit BY Dj.BOM
iptables -t nat -I PREROUTING -d 202.43.34.110 -p tcp --dport 21 -j ACCEPT
ไม่มีความคิดเห็น:
แสดงความคิดเห็น