proxy server refused connection

Diskusi tentang Ubuntu Server baik webserver, database server, samba server dan service lainnya serta jaringan menggunakan Sistem Operasi Ubuntu.
User avatar
masws
Posts: 18
Joined: 08 May 2010, 10:07

proxy server refused connection

Postby masws » 11 Apr 2011, 10:28

dear all,

mau share n tanya mengenai "squid.conf" yang saya punya nih.
"squid.conf" ini saya hapus semua teks2 yang ori deafult bawaan-nya, so saya create ulang 1 by 1. berikut configurasi squid saya :

Code: Select all


#-------------------------------------------------
# Options for tuning the cache
#------------------------------------------------
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
cache deny QUERY

refresh_pattern ^ftp:           1440    20%     10080
refresh_pattern ^gopher:        1440    0%      1440
refresh_pattern .               0       20%     4


#-------------------------------------------------
# Disk cache options
#-------------------------------------------------
cache_mem 128 MB
cache_swap_low 90
cache_swap_high 95
maximum_object_size 8192 KB
minimum_object_size 0 KB

# alokasi 4000MB space harddisk untuk disk cache
cache_dir ufs /var/spool/squid 4000 16 256


#------------------------------------------------
# Log file options
#------------------------------------------------
access_log /var/log/squid/access.log squid
cache_log /var/log/squid/cache.log
cache_store_log /var/log/squid/store.log
#mime_table /var/run/squid.pid
pid_filename /var/run/squid.pid


#-------------------------------------------------
# Network options
#--------------------------------------------------
# squid dijalankan di port 3128
http_port 3128 transparent


#-------------------------------------------------------------
# Access Control
#-------------------------------------------------------------
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         # https
acl SSL_ports port 563         # snews
acl SSL_ports port 873         # rsync
acl safe_ports port 80         # http
acl safe_ports port 21         # ftp
acl safe_ports port 443         # https
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 safe_ports port 631         # cups
acl safe_ports port 873         # rsync
acl safe_ports port 901         # SWAT
acl purge method PURGE
acl CONNECT method CONNECT

# Izinkan akses cachemgr hanya dari localhost
http_access allow manager localhost
http_access deny manager

# Izinkan request purge hanya dari localhost
http_access allow purge localhost
http_access deny purge

# Deny request ke ports yang tidak dikenal
http_access deny !Safe_ports

# Deny CONNECT selain port SSL
http_access deny CONNECT !SSL_ports


#-------------------------------------------------
# Our policy starts here
#-------------------------------------------------
# list IP
acl pc_umum src 192.168.1.11
acl pc_finance src 192.168.1.12
acl pc_gm src 192.168.1.21
acl pc_intsales src 192.168.1.31
acl pc_sales src 192.168.1.32
acl pc_offset src 192.168.1.41

# definisikan website yang di blok
acl website_blok url_regex -i "/etc/squid/website_blok.lst"

# deny browsing ke website_blok
http_access deny website_blok all

# Allow pc untuk browsing
http_access allow pc_umum

# Deny semua akses ke server proxy
http_access deny all

icp_access allow all
http_reply_access allow all


#----------------------------------------------------
# DNS options
#----------------------------------------------------
hosts_file /etc/hosts


#----------------------------------------------------
# Miscellaneous
#----------------------------------------------------   
icon_directory /usr/share/squid/icons
error_directory /usr/share/squid/errors/English
coredump_dir /var/spool/squid
ie_refresh on
half_closed_clients off




proxy sudah saya ujicobakan k satu pc terlebih dahulu (pc_umum). website_blok.lst yang saya buat adalah untuk blok facebook dan twitter.
website_blok sudah berhasil dan sesuai keinginan.

saya browse google.com dan yahoo.com dapat terbuka, karena domain tsb tidak saya definisikan di website_blok.lst

namun ketika saya browse mail.yahoo.com , muncul error sbb :
Proxy server refused connection
Firefox is configured to use a proxy server that is refusing connetions
dst ...

mohon pencerahan rekan sekalian mengenai error tsb

thanks
ws
User avatar
yudiarbi
Posts: 627
Joined: 22 Mar 2011, 09:31
Location: Probolinggo, Jawa Timur
Contact:

Re: proxy server refused connection

Postby yudiarbi » 11 Apr 2011, 13:46

mencoba membantu..

Code: Select all

acl website_blok url_regex -i "/etc/squid/website_blok.lst"

coba -i nya di hapus

Code: Select all

http_access deny website_blok all

all -nya coba dihapus....
User avatar
masws
Posts: 18
Joined: 08 May 2010, 10:07

Re: proxy server refused connection

Postby masws » 12 Apr 2011, 08:41

@ bro yudiarbi

saya sudah lakukan "-i" and "all" dihapus, but masih sama,

untuk browse mail.yahoo.com - gmail.com muncul
"proxy server refused connection"

kenapa y? apa harus bikin squid.conf lagi tanpa dihapus ampe 0 baris??
mohon pencerahan rekan sekalian,

thanks
ws
User avatar
MasDjo
Posts: 1260
Joined: 03 Jan 2010, 17:38
Location: Bayuangga City
Contact:

Re: proxy server refused connection

Postby MasDjo » 12 Apr 2011, 09:59

Pakai squid versi berapa ini ?
Coba dicek pakai komputer lain, apakah tetap terblokir, jika ternyata pd komputer lain tidak terblokir, coba cek jam BIOS pd komputer.
Jika masih belum solve juga, coba copy paste saja squid.conf dari para master yg sudah terbukti bisa jalan normal (googling saja).

Dan sekedar mengingatkan, jangan lupa command :
sudo squid -k reconfigure
setelah edit squid.conf
User avatar
masws
Posts: 18
Joined: 08 May 2010, 10:07

Re: proxy server refused connection

Postby masws » 12 Apr 2011, 10:13

@ masdjo

saya pakai squid 2.7 stable 7 di ubuntu 10.04

okelah.. saya akan coba googling 'squid.conf' rekan2 yg joss..

setelah edit 'squid.conf' biasanya saya lakukan:
/etc/init.d/networking restart dan
squid -k reconfigure

thanks
ws
User avatar
karaeng
Posts: 4
Joined: 10 Sep 2010, 07:29
Contact:

Re: proxy server refused connection

Postby karaeng » 12 Apr 2011, 10:45

klo mau mengedit conf
ig squid yg lagi running...
jgn langsung di restart squidnya...

biasakan cek squid.conf

#squid -k parse
#squid -k reconfigure
User avatar
masws
Posts: 18
Joined: 08 May 2010, 10:07

Re: proxy server refused connection

Postby masws » 12 Apr 2011, 11:41

@ karaeng

ooo gitu ya..

jadi runutannya itu gini y:
1. edit squid.conf
2. squid -k parse
3. squid -k reconfigure

gitu y?

lalu apakah perlu untuk restart networknya (/etc/init.d/networking restart) ?


thanks
ws
User avatar
yudiarbi
Posts: 627
Joined: 22 Mar 2011, 09:31
Location: Probolinggo, Jawa Timur
Contact:

Re: proxy server refused connection

Postby yudiarbi » 12 Apr 2011, 11:50

ya bos, gak perlu restart network, cukup squid -k reconfigure, biasane kl salah lgsg muncul error, coba di posting website_blok.lst
User avatar
masws
Posts: 18
Joined: 08 May 2010, 10:07

Re: proxy server refused connection

Postby masws » 12 Apr 2011, 12:00

@ bos yudiarbi

website_blok just like this :

http://www.facebook.com
http://www.twitter.com
twitter.com

http://www.twitter.com n twitter.com saya pasang karena udah ta jajal browse http://www.twitter.com bisa ke blok, but ketika ketik twitter.com masih bs kebuka

thanks
ws
User avatar
yudiarbi
Posts: 627
Joined: 22 Mar 2011, 09:31
Location: Probolinggo, Jawa Timur
Contact:

Re: proxy server refused connection

Postby yudiarbi » 12 Apr 2011, 12:07

masws wrote:@ bos yudiarbi

website_blok just like this :

http://www.facebook.com
http://www.twitter.com
twitter.com

http://www.twitter.com n twitter.com saya pasang karena udah ta jajal browse http://www.twitter.com bisa ke blok, but ketika ketik twitter.com masih bs kebuka

thanks
ws

waduh bahasa langit(inggris)hehee
aq sing ngiranya ni squidnya, coba uninstall dulu, terus install lg..
User avatar
sipelaut
Posts: 1963
Joined: 03 Jan 2010, 17:25
Location: madura-sampang
Contact:

Re: proxy server refused connection

Postby sipelaut » 13 Apr 2011, 13:04

karaeng wrote:klo mau mengedit conf
ig squid yg lagi running...
jgn langsung di restart squidnya...

biasakan cek squid.conf

#squid -k parse
#squid -k reconfigure

wabusettdah... jdi selama ini kulakukan hal yg salah
klo kumau edit squid kantor langsung aja main antem
# nano /etc/squid/squid.conf
. edit..... dahhhhh
. editt.... dahhh...
. edittt.. dahhh....
lalu

# /etc/init.d/squid restart

heekekekkk.... dampaknya apa yaa kira2 klo langusng main antem gitu ???? :( xixixixiiii......



btw...
masws wrote:proxy sudah saya ujicobakan k satu pc terlebih dahulu (pc_umum). website_blok.lst yang saya buat adalah untuk blok facebook dan twitter.
website_blok sudah berhasil dan sesuai keinginan.

saya browse google.com dan yahoo.com dapat terbuka, karena domain tsb tidak saya definisikan di website_blok.lst

namun ketika saya browse mail.yahoo.com , muncul error sbb :
Proxy server refused connection
Firefox is configured to use a proxy server that is refusing connetions
dst ...

mohon pencerahan rekan sekalian mengenai error tsb

thanks
ws

squid nya tranparent gak nichh broo...?????
User avatar
ilham2930
Posts: 1123
Joined: 02 Jan 2010, 19:30
Location: /indonesia/tangerang/bonank_city
Contact:

Re: proxy server refused connection

Postby ilham2930 » 13 Apr 2011, 13:39

coba cek log nya.. copas erornya ke sini..
User avatar
masws
Posts: 18
Joined: 08 May 2010, 10:07

Re: proxy server refused connection

Postby masws » 13 Apr 2011, 15:55

rekan2 semuanya..
para master ubuntu sekalian..

alhamdulillah proxy-nya udah g "refused connection ..." lagi, step2 nya kemaren tuh begini :
1. uninstall squid n rekan2nya (saran dari bos yudiardi)
2. reinstall squid #apt-get install squid
3. #cp /etc/squid/squid.conf /etc/squid/squid.conf_ori
4. hapus semua baris pada /etc/squid/squid.conf ampe baris = 0
5. create 1 by 1 semua konfigurasi squid yang diperlukan, dan policy yang diinginkan
6. squid -k parse
7. squid -k reconfigure
8. jajal di client, browse ke mail.yahoo.com - gmail.com
9. sukses, jozz gandouzz
10. posting ke ubuntu-indonesia.com

pada rc.local saya kasih perintah seperti berikut untuk transparent proxy :

iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -d 0/0 -j MASQUERADE

iptables A PREROUTING -t nat -j REDIRECT -p tcp -s 192.168.1.0/24 -d 0.0 --dport 80 --to-ports 3128

exit 0

pertanyaannya sekarang, di browser client (firefox) - saya harus set manual ip server proxy n port 3128. G bisa otomatis detect proxy-nya

ada yang salah kah?

mohon pencerahan

thanks
ws
User avatar
MasDjo
Posts: 1260
Joined: 03 Jan 2010, 17:38
Location: Bayuangga City
Contact:

Re: proxy server refused connection

Postby MasDjo » 13 Apr 2011, 20:35

@masws : apakah gateway klien sudah diarahkan ke server proxy ?
User avatar
zitux
Posts: 843
Joined: 15 Jan 2010, 23:17
Location: Malang Jatim Indonesia
Contact:

Re: proxy server refused connection

Postby zitux » 14 Apr 2011, 06:48

sipelaut wrote:
wabusettdah... jdi selama ini kulakukan hal yg salah
klo kumau edit squid kantor langsung aja main antem
# nano /etc/squid/squid.conf
. edit..... dahhhhh
. editt.... dahhh...
. edittt.. dahhh....
lalu

# /etc/init.d/squid restart

heekekekkk.... dampaknya apa yaa kira2 klo langusng main antem gitu :( ???? :( xixixixiiii......


coba aja di squid.conf diantem sama $#%&$ atau 1 saja " - "

langsung /etc/init.d/squid restart

jadi nya kayak apa ?
babak belur ndak ?
:grin: :grin:
User avatar
yudiarbi
Posts: 627
Joined: 22 Mar 2011, 09:31
Location: Probolinggo, Jawa Timur
Contact:

Re: proxy server refused connection

Postby yudiarbi » 14 Apr 2011, 08:32

masws wrote:pertanyaannya sekarang, di browser client (firefox) - saya harus set manual ip server proxy n port 3128. G bisa otomatis detect proxy-nya

thanks
ws

itu krn transparent proxy gak berhasil, kl biasanya sih set transparent proxy di squid.conf yaitu di bagian
http_port 3128 transparent
dan kayke bos masws ud ad tuh di squid.conf, mgkn permasalah di iptables
masws wrote:iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -d 0/0 -j MASQUERADE

iptables A PREROUTING -t nat -j REDIRECT -p tcp -s 192.168.1.0/24 -d 0.0 --dport 80 --to-ports 3128

di rc.local di hapus dulu, trus jalanin
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE #mode modem bridge
iptables -t nat -A PREROUTING -i eth0 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128 #agar dilewatkan lgsg 3128
opsi -A adalah Append artinya router menambah catatan ip pada tabel IP
mungkin bisa membantu :D
User avatar
masws
Posts: 18
Joined: 08 May 2010, 10:07

Re: proxy server refused connection

Postby masws » 15 Apr 2011, 08:48

maaf, tanya error lagi

pagi ini server squid saya matikan untuk tambah memori.
setelah saya nyalakan lagi, saya coba start squid dengan
/etc/init.d/squid start

lalu saya coba cek : #squid -k parse (hasil no error)
lalu saya coba cek : #squid -k reconfigure (lalu muncul error)
squid: ERROR: No running copy

ini karena apa y?

mohon pencerahan sekalian

thanks
ws
User avatar
yudiarbi
Posts: 627
Joined: 22 Mar 2011, 09:31
Location: Probolinggo, Jawa Timur
Contact:

Re: proxy server refused connection

Postby yudiarbi » 15 Apr 2011, 17:29

squidnya belum start tuh, coba kasih perintah
service squid start atau /etc/init.d/squid start, ato lihat pemakaian folder proxynya...
User avatar
Rh354
Posts: 718
Joined: 14 Mar 2010, 19:56
Location: between the truth and the lies
Contact:

Re: proxy server refused connection

Postby Rh354 » 17 Apr 2011, 18:57

menyimak dl para mastah squid menurunkan wejangan :)

Return to “Ubuntu Server”

Who is online

Users browsing this forum: No registered users and 3 guests