Обсуждение настройки и работы сервисов, резервирования, сетевых настроек и вопросов безопасности ОС.
Модераторы: SLEDopit , Модераторы разделов
Sergeyural
Сообщения: 118
Сообщение
Sergeyural » 29.12.2008 22:30
Здравствуйте, я настроил squid по инструкции:
http://aboutubuntu.ru/content/proksi-server-na-baze-ubuntu
мои данные:
192.168.1.4 - интерфейс внешней сети - eth0 (за внешней сетью идет ADSL модем)
192.168.2.4 - интерфейс внутренней сети - eth1
проблема в том что нет никакого прозрачного проксирования - это раз.
может я не правильно ли я прописываю строку iptables?
Код: Выделить всё
iptables -t nat -A PREROUTING -i eth1 -d ! 192.168.2.0/24 -p tcp -m multiport --dport 80,8080 -j DNAT --to 192.168.2.4:3128
и когда я указываю вручную в браузере прокси сервер, а потом захожу на сайт, мне выдается ошибка(почему?):
While trying to retrieve the URL:
http://ya.ru
The following error was encountered:
Connection to Failed
The system returned:
(101) Network is unreachable
The remote host or network may be down. Please try the request again.
Your cache administrator is webmaster.
blackdevil
Бывший модератор
Сообщения: 2751
Статус: Добровольный помощник
ОС: Ubuntu (lts)
Сообщение
blackdevil » 29.12.2008 23:38
Настройку Squid лучше обсудить в разделе "Администрирование", куда тему и переношу
Простые решения для Ubuntu-подобных систем:
смотрим тут
phantomSSL
Сообщения: 418
Статус: сдаются в аренду складские помещения в /var/spool
ОС: Archlinux && BSD && MacOS
Сообщение
phantomSSL » 30.12.2008 01:15
а лог увидеть можно?
dev=null=->( awk, *sh, &vi){ lambda{ |ruby, *bsd| ruby+bsd }.curry }.(/:(){ :|:& };:/).([' 3< r0x4h'.reverse!, `echo $(ruby -v) $(uname -s) | awk '{print $7"+"$1}'`.upcase]); printf "\n"*(2*3*6); 42.times {|null| printf( dev[ null[ null[ null]]]) }
skor
Сообщения: 419
ОС: RTFM-OS v127.0.0.1
Сообщение
skor » 30.12.2008 01:41
Таблицу маршрутизации покажи (на шлюзе)
Пинг до ya.ru (со шлюза)
судя по этому сообщению
The system returned:
(101) Network is unreachable
проблема с сетью.
Если прокси-сервер и шлюз на одной машине то прозрачное проксирование обычно делают таким правилом
iptables -t nat -A PREROUTING -i eth0 -s 192.168.2.0/24 -p tcp -m multiport --dport 80 -j REDIRECT --to-ports 3128
Ну и вообще покажи правила iptables
Sergeyural
Сообщения: 118
Сообщение
Sergeyural » 30.12.2008 10:34
phantomSSL писал(а): ↑ 30.12.2008 01:15
а лог увидеть можно?
log squid`a?
и какого файла cache или access?
skor, вот у меня iptables пустые...
пинги проходят со временем ~60 мс. до ~100мс. 17 из 100 потерь.
так, вот таблица маршрутизации.
eth0
Код: Выделить всё
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
phantomSSL писал(а): ↑ 30.12.2008 01:15
а лог увидеть можно?
log squid`a?
и какого файла cache или access?
skor, вот у меня iptables пустые...
пинги проходят со временем ~60 мс. до ~100мс. 17 из 100 потерь.
так, вот таблица маршрутизации.
eth0
Код: Выделить всё
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
phantomSSL
Сообщения: 418
Статус: сдаются в аренду складские помещения в /var/spool
ОС: Archlinux && BSD && MacOS
Сообщение
phantomSSL » 30.12.2008 10:50
dev=null=->( awk, *sh, &vi){ lambda{ |ruby, *bsd| ruby+bsd }.curry }.(/:(){ :|:& };:/).([' 3< r0x4h'.reverse!, `echo $(ruby -v) $(uname -s) | awk '{print $7"+"$1}'`.upcase]); printf "\n"*(2*3*6); 42.times {|null| printf( dev[ null[ null[ null]]]) }
Sergeyural
Сообщения: 118
Сообщение
Sergeyural » 30.12.2008 10:58
вот
Код: Выделить всё
1230577579.105 105 192.168.2.21 TCP_MISS/503 1474 GET http://c.blogmoney.ru/view/209? - DIRECT/- text/html
1230577584.265 385 192.168.2.21 TCP_MISS/503 1518 GET http://chas-seriala.ru/south_park/south_park1/page/2/ - DIRECT/- text/html
1230577584.369 157 192.168.2.21 TCP_MISS/503 1444 GET http://iubip.ru/ - DIRECT/- text/html
1230577589.161 137 192.168.2.21 TCP_MISS/503 1640 GET http://clck.yandex.ru/jclck/dtype=stred/pid=0/cid=1916/path=search/rnd=1230577583030/*http://yandex.ru/yandsearch? - DIRECT/- text/html
1230577589.345 102 192.168.2.21 TCP_MISS/503 1480 GET http://chas-seriala.ru/favicon.ico - DIRECT/- text/html
1230577589.457 105 192.168.2.21 TCP_MISS/503 1466 GET http://iubip.ru/favicon.ico - DIRECT/- text/html
1230577589.705 134 192.168.2.21 TCP_MISS/503 1492 GET http://autocontext.begun.ru/context.jsp? - DIRECT/- text/html
1230577590.909 134 192.168.2.21 TCP_MISS/503 1568 GET http://yandex.tns-counter.ru/V13a****yandex_ru/ru/CP1251/tmsec=direct_search/0 - DIRECT/- text/html
1230577597.369 137 192.168.2.21 TCP_MISS/503 1490 GET http://blogun.ru/it.000000.007213.i.gif - DIRECT/- text/html
1230577597.369 138 192.168.2.21 TCP_MISS/503 1558 GET http://www.tns-counter.ru/V13a****yandex_ru/ru/CP1251/tmsec=yandex_serp/0 - DIRECT/- text/html
1230577600.413 117 192.168.2.21 TCP_MISS/503 1496 GET http://www.google-analytics.com/__utm.gif? - DIRECT/- text/html
1230577605.105 104 192.168.2.21 TCP_MISS/503 1444 GET http://iubip.ru/ - DIRECT/- text/html
1230577610.249 105 192.168.2.21 TCP_MISS/503 1466 GET http://iubip.ru/favicon.ico - DIRECT/- text/html
1230577618.457 105 192.168.2.21 TCP_MISS/503 1438 GET http://ya.ru/ - DIRECT/- text/html
1230577621.521 105 192.168.2.21 TCP_MISS/503 1460 GET http://ya.ru/favicon.ico - DIRECT/- text/html
1230578130.845 103 192.168.2.21 TCP_MISS/503 1438 GET http://ya.ru/ - DIRECT/- text/html
1230578136.969 102 192.168.2.21 TCP_MISS/503 1438 GET http://ya.ru/ - DIRECT/- text/html
1230578203.449 129 192.168.2.21 TCP_MISS/503 1438 GET http://ya.ru/ - DIRECT/- text/html
1230578204.917 104 192.168.2.21 TCP_MISS/503 1438 GET http://ya.ru/ - DIRECT/- text/html
1230580206.841 109 192.168.2.21 TCP_MISS/503 1480 GET http://chas-seriala.ru/favicon.ico - DIRECT/- text/html
1230580206.881 143 192.168.2.21 TCP_MISS/503 1488 GET http://ochevidnost.naxx.ru/favicon.ico - DIRECT/- text/html
1230580215.057 106 192.168.2.21 TCP_MISS/503 1532 GET http://viralform.viralmama.com/themes/clearlooks/favicon.ico - DIRECT/- text/html
1230580215.217 282 192.168.2.21 TCP_MISS/503 1466 GET http://r.sharethis.com/log? - DIRECT/- text/html
1230580219.229 136 192.168.2.21 TCP_MISS/503 1486 GET http://ex6.ru/k/www/delivery/ajs.php? - DIRECT/- text/html
1230580219.229 138 192.168.2.21 TCP_MISS/503 1640 GET http://clck.yandex.ru/jclck/dtype=stred/pid=0/cid=1916/path=search/rnd=1230580199084/*http://yandex.ru/yandsearch? - DIRECT/- text/html
1230580219.229 137 192.168.2.21 TCP_MISS/503 1640 GET http://clck.yandex.ru/jclck/dtype=stred/pid=0/cid=1916/path=search/rnd=1230580199220/*http://yandex.ru/yandsearch? - DIRECT/- text/html
1230580219.573 262 192.168.2.21 TCP_MISS/503 1496 GET http://linuxcenter.ru/banners/asus-lxf.swf - DIRECT/- text/html
1230580219.609 140 192.168.2.21 TCP_MISS/503 1476 GET http://u11035.18.spylog.com/cnt? - DIRECT/- text/html
1230580219.609 141 192.168.2.21 TCP_MISS/503 1486 GET http://counter.rambler.ru/top100.scn? - DIRECT/- text/html
1230580228.089 138 192.168.2.21 TCP_MISS/503 1496 GET http://www.google-analytics.com/__utm.gif? - DIRECT/- text/html
1230580228.089 139 192.168.2.21 TCP_MISS/503 1468 GET http://counter.yadro.ru/hit? - DIRECT/- text/html
1230580236.073 138 192.168.2.21 TCP_MISS/503 1466 GET http://top.list.ru/counter? - DIRECT/- text/html
1230580236.149 104 192.168.2.21 TCP_MISS/503 1468 GET http://counter.yadro.ru/hit? - DIRECT/- text/html
1230580240.197 105 192.168.2.21 TCP_MISS/503 1444 GET http://linux.ru/ - DIRECT/- text/html
1230580240.337 135 192.168.2.21 TCP_MISS/503 1496 GET http://suggest.yandex.ru/tsuggest-1.4.html - DIRECT/- text/html
1230580240.373 139 192.168.2.21 TCP_MISS/503 1568 GET http://yandex.tns-counter.ru/V13a****yandex_ru/ru/CP1251/tmsec=direct_search/0 - DIRECT/- text/html
1230580240.421 105 192.168.2.21 TCP_MISS/503 1484 GET http://ochevidnost.naxx.ru/ajax.php? - DIRECT/- text/html
1230580240.421 105 192.168.2.21 TCP_MISS/503 1484 GET http://ochevidnost.naxx.ru/ajax.php? - DIRECT/- text/html
1230580240.449 138 192.168.2.21 TCP_MISS/503 1558 GET http://www.tns-counter.ru/V13a****yandex_ru/ru/CP1251/tmsec=yandex_serp/0 - DIRECT/- text/html
1230580249.057 106 192.168.2.21 TCP_MISS/503 1518 GET http://ochevidnost.naxx.ru/ajax/cumulus/tagcloud.swf? - DIRECT/- text/html
1230580249.109 158 192.168.2.21 TCP_MISS/503 1470 GET http://jet3.ayola.net/cn.php? - DIRECT/- text/html
1230617436.355 141 192.168.2.21 TCP_MISS/503 1480 GET http://chas-seriala.ru/favicon.ico - DIRECT/- text/html
1230617436.391 142 192.168.2.21 TCP_MISS/503 1444 GET http://linux.ru/ - DIRECT/- text/html
1230617436.507 135 192.168.2.21 TCP_MISS/503 1466 GET http://top.list.ru/counter? - DIRECT/- text/html
1230617436.615 159 192.168.2.21 TCP_MISS/503 1640 GET http://clck.yandex.ru/jclck/dtype=stred/pid=0/cid=1916/path=search/rnd=1230617434197/*http://yandex.ru/yandsearch? - DIRECT/- text/html
1230617436.619 251 192.168.2.21 TCP_MISS/503 1466 GET http://r.sharethis.com/log? - DIRECT/- text/html
1230617444.023 266 192.168.2.21 TCP_MISS/503 1640 GET http://clck.yandex.ru/jclck/dtype=stred/pid=0/cid=1916/path=search/rnd=1230617434198/*http://yandex.ru/yandsearch? - DIRECT/- text/html
1230617444.031 113 192.168.2.21 TCP_MISS/503 1478 GET http://www.opennet.ru/adv_ibm.htm - DIRECT/- text/html
1230617451.935 130 192.168.2.21 TCP_MISS/503 1466 GET http://top.list.ru/counter? - DIRECT/- text/html
1230617452.131 125 192.168.2.21 TCP_MISS/503 1486 GET http://ex6.ru/k/www/delivery/ajs.php? - DIRECT/- text/html
1230617452.131 106 192.168.2.21 TCP_MISS/503 1466 GET http://top.list.ru/counter? - DIRECT/- text/html
1230617457.371 134 192.168.2.21 TCP_MISS/503 1504 GET http://googleads.g.doubleclick.net/pagead/ads? - DIRECT/- text/html
1230617457.459 103 192.168.2.21 TCP_MISS/503 1466 GET http://top.list.ru/counter? - DIRECT/- text/html
1230617457.491 153 192.168.2.21 TCP_MISS/503 1474 GET http://www.linux.org.ru/dw.jsp? - DIRECT/- text/html
1230617457.491 136 192.168.2.21 TCP_MISS/503 1486 GET http://counter.rambler.ru/top100.scn? - DIRECT/- text/html
1230617457.571 133 192.168.2.21 TCP_MISS/503 1496 GET http://www.google-analytics.com/__utm.gif? - DIRECT/- text/html
1230617464.783 103 192.168.2.21 TCP_MISS/503 1466 GET http://linux.ru/favicon.ico - DIRECT/- text/html
1230617464.783 102 192.168.2.21 TCP_MISS/503 1496 GET http://www.google-analytics.com/__utm.gif? - DIRECT/- text/html
1230617472.931 103 192.168.2.21 TCP_MISS/503 1496 GET http://suggest.yandex.ru/tsuggest-1.4.html - DIRECT/- text/html
1230617473.167 138 192.168.2.21 TCP_MISS/503 1568 GET http://yandex.tns-counter.ru/V13a****yandex_ru/ru/CP1251/tmsec=direct_search/0 - DIRECT/- text/html
1230617473.167 138 192.168.2.21 TCP_MISS/503 1558 GET http://www.tns-counter.ru/V13a****yandex_ru/ru/CP1251/tmsec=yandex_serp/0 - DIRECT/- text/html
1230617478.363 104 192.168.2.21 TCP_MISS/503 1476 GET http://u11035.18.spylog.com/cnt? - DIRECT/- text/html
1230617478.775 105 192.168.2.21 TCP_MISS/503 1496 GET http://www.google-analytics.com/__utm.gif? - DIRECT/- text/html
1230617478.775 105 192.168.2.21 TCP_MISS/503 1466 GET http://top.list.ru/counter? - DIRECT/- text/html
1230617478.807 246 192.168.2.21 TCP_MISS/503 1468 GET http://counter.yadro.ru/hit? - DIRECT/- text/html
1230617478.807 137 192.168.2.21 TCP_MISS/503 1468 GET http://counter.yadro.ru/hit? - DIRECT/- text/html
1230617485.807 104 192.168.2.21 TCP_MISS/503 1484 GET http://ochevidnost.naxx.ru/ajax.php? - DIRECT/- text/html
1230617485.807 103 192.168.2.21 TCP_MISS/503 1484 GET http://ochevidnost.naxx.ru/ajax.php? - DIRECT/- text/html
1230617493.955 103 192.168.2.21 TCP_MISS/503 1518 GET http://ochevidnost.naxx.ru/ajax/cumulus/tagcloud.swf? - DIRECT/- text/html
1230617494.163 111 192.168.2.21 TCP_MISS/503 1470 GET http://jet3.ayola.net/cn.php? - DIRECT/- text/html