* [Comm] iptables rules?
@ 2006-03-30 14:22 Andrey Rybak
2006-03-30 14:30 ` Dmitriy L. Kruglikov
2006-03-31 6:46 ` Rinat
0 siblings, 2 replies; 13+ messages in thread
From: Andrey Rybak @ 2006-03-30 14:22 UTC (permalink / raw)
To: ALT Linux Community
Привет, community!
Есть проблема - перенести некий веб-сервер с белого адреса на серый. На
opennet.ru нашел по этой теме статьи. Переброс адресов делается
средствами iptables. Сделал. Но встает другая проблема - http-трафик на
сервере, через который делается проброс соединения, заворачивается на
сквид. Получаю такую картину: tcpdump http запросы к апачу, что
переносится на серые адреса, видит на входе, а на выходе эти пакеты не
появляются. В логах сквида эти запросы пишутся как NONE. Не пускает
тобишь сквид. dst acl в файле squid.conf на этот серый адрес создал.
Разрешил ему доступ. Не срабатывает. Я уже вообще написал http_access
allow all. И тут не работает. Так кто виноват - фаерволл или сквид (или
я :-) )?
Заранее огромное спасибо.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Comm] iptables rules?
2006-03-30 14:22 [Comm] iptables rules? Andrey Rybak
@ 2006-03-30 14:30 ` Dmitriy L. Kruglikov
2006-03-31 6:46 ` Rinat
1 sibling, 0 replies; 13+ messages in thread
From: Dmitriy L. Kruglikov @ 2006-03-30 14:30 UTC (permalink / raw)
To: community
On Thu, 30 Mar 2006 17:22:29 +0300
Andrey Rybak wrote:
> Заранее огромное спасибо.
А можно более подробно ...
Где и какие адреса...
Хоть примерно - топологию сети...
Сколько интерфейсов в сервере[ах] ...
Откуда идут запросы и кто их заворачивает куда ...
Потому как без пол-литры я ничего понять не смог, например ... :)
--
Best regards,
Dmitriy L. Kruglikov .--.
Dmitriy.Kruglikov@orionagro.com.ua |@_@ |
DKR6-RIPE |!_/ |
ICQ# 13047326 // \ \
XMPP:dkr6@jabber.ru (| | )
/'\_ _/`\
Powered by Linux \___)=(___/
-- Мысль --
Обязанность судьи - исполнять закон, а не создавать его.
-- Латинская пословица
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Comm] iptables rules?
2006-03-30 14:22 [Comm] iptables rules? Andrey Rybak
2006-03-30 14:30 ` Dmitriy L. Kruglikov
@ 2006-03-31 6:46 ` Rinat
2006-03-31 7:32 ` Kaydannik Axel
1 sibling, 1 reply; 13+ messages in thread
From: Rinat @ 2006-03-31 6:46 UTC (permalink / raw)
To: ALT Linux Community
Andrey Rybak пишет:
> Привет, community!
> Есть проблема - перенести некий веб-сервер с белого адреса на серый. На
> opennet.ru нашел по этой теме статьи. Переброс адресов делается
> средствами iptables. Сделал. Но встает другая проблема - http-трафик на
> сервере, через который делается проброс соединения, заворачивается на
> сквид. Получаю такую картину: tcpdump http запросы к апачу, что
> переносится на серые адреса, видит на входе, а на выходе эти пакеты не
> появляются. В логах сквида эти запросы пишутся как NONE. Не пускает
> тобишь сквид. dst acl в файле squid.conf на этот серый адрес создал.
> Разрешил ему доступ. Не срабатывает. Я уже вообще написал http_access
> allow all. И тут не работает. Так кто виноват - фаерволл или сквид (или
> я :-) )?
возможно с роутингом проблемы....
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Comm] iptables rules?
2006-03-31 6:46 ` Rinat
@ 2006-03-31 7:32 ` Kaydannik Axel
2006-03-31 10:31 ` Andrey Rybak
` (2 more replies)
0 siblings, 3 replies; 13+ messages in thread
From: Kaydannik Axel @ 2006-03-31 7:32 UTC (permalink / raw)
To: ALT Linux Community
Нет все проще господа.
Работой телепатии я догадываюсь что у человека стоит ПРОЗРАЧНЫЙ сквиди
все что касается 80 порта на внутреннем интерфейсе забрасывается на
сквид. отсюда сквид когда к нему забрасывается на вход как бы выход (
тобишь ШТМЛ контент) он теряется конечно же.
Вывод.
Сделать что бы именно с этой машины порты ни на какой сквид не форвардились
На будущее: мог бы и представить правила настроек файрвола, сквида и
примерную топологию, а то - ей богу...
31.03.06, Rinat<alt@tnu.ru> написал(а):
> Andrey Rybak пишет:
> > Привет, community!
> > Есть проблема - перенести некий веб-сервер с белого адреса на серый. На
> > opennet.ru нашел по этой теме статьи. Переброс адресов делается
> > средствами iptables. Сделал. Но встает другая проблема - http-трафик на
> > сервере, через который делается проброс соединения, заворачивается на
> > сквид. Получаю такую картину: tcpdump http запросы к апачу, что
> > переносится на серые адреса, видит на входе, а на выходе эти пакеты не
> > появляются. В логах сквида эти запросы пишутся как NONE. Не пускает
> > тобишь сквид. dst acl в файле squid.conf на этот серый адрес создал.
> > Разрешил ему доступ. Не срабатывает. Я уже вообще написал http_access
> > allow all. И тут не работает. Так кто виноват - фаерволл или сквид (или
> > я :-) )?
> возможно с роутингом проблемы....
> _______________________________________________
> Community mailing list
> Community@lists.altlinux.org
> https://lists.altlinux.org/mailman/listinfo/community
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Comm] iptables rules?
2006-03-31 7:32 ` Kaydannik Axel
@ 2006-03-31 10:31 ` Andrey Rybak
2006-03-31 10:44 ` Andrey Rybak
2006-03-31 12:08 ` Andrey Rybak
2006-04-04 10:38 ` Andrey Rybak
2 siblings, 1 reply; 13+ messages in thread
From: Andrey Rybak @ 2006-03-31 10:31 UTC (permalink / raw)
To: ALT Linux Community
Kaydannik Axel пишет:
> Вывод.
> Сделать что бы именно с этой машины порты ни на какой сквид не форвардились
>
> На будущее: мог бы и представить правила настроек файрвола, сквида и
> примерную топологию, а то - ей богу...
>
>
Предоставлял, но почему-то не дошло. Наверное рисунок схемы в аттачменте
размером больше допустимого. Попробую псевдографикой.
Правда, вижу, я в ней не силен. Посмотрю, как в рассылке будет. Надеюсь
переделывать не надо будет.
Схема в атачменте
На шлюзе (1.1.1.1)
в фаерволле
iptables -t nat -A PREROUTING -p TCP -d 3.3.3.3 --dport 80 -j DNAT
--to-destination 10.10.10.10:80
iptables -A FORWARD -p TCP -d 10.10.10.10/32 --dport 80 -j ACCEPT
iptables -A FORWARD -p TCP -s 10.10.10.1/32 --sport 80 -j ACCEPT
На сервере (серые адреса не за натом), через который проброс делается и
на котором прозрачный сквид (2.2.2.2)
в фаерволле
iptables -t nat -p TCP -A PREROUTING -s 0/0 -d 10.10.10.10/32 --dport 80
-j ACCEPT
iptables -p TCP -A INPUT -d 10.10.10.10/32 --dport 80 -j ACCEPT
iptables -p TCP -A OUTPUT -d 10.10.10.10/32 --dport 80 -j ACCEPT
в конфигурации сквида
acl myacl dst 10.10.10.10/32
http_access allow myacl
мир
|
---------------------------------------
шлюз
iptables
1.1.1.1
-----------------------------------------
| |
| |
------------------------ ------------------------
3.3.3.3 2.2.2.2
то, что переносим Здесь у меня iptables&squid
----------------------------------
-------------------------------
|
|
------------------------------
Серый адрес, куда надо перенести
10.10.10.10
-----------------------------
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Comm] iptables rules?
2006-03-31 10:31 ` Andrey Rybak
@ 2006-03-31 10:44 ` Andrey Rybak
0 siblings, 0 replies; 13+ messages in thread
From: Andrey Rybak @ 2006-03-31 10:44 UTC (permalink / raw)
To: ALT Linux Community
Елки-палки - угадал, что плохо.
А вот так, наверно лучше:
мир
|
---------------------------------------
шлюз
iptables
1.1.1.1
----------------------------------------
| |
| |
------------------------ ------------------------
3.3.3.3 2.2.2.2
то, что переносим Здесь у меня iptables&squid
----------------------------------
-------------------------------
|
|
------------------------------
Серый адрес,
куда надо перенести
10.10.10.10
-----------------------------
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Comm] iptables rules?
2006-03-31 7:32 ` Kaydannik Axel
2006-03-31 10:31 ` Andrey Rybak
@ 2006-03-31 12:08 ` Andrey Rybak
2006-04-05 7:25 ` Шенцев Алексей Владимирович
2006-04-04 10:38 ` Andrey Rybak
2 siblings, 1 reply; 13+ messages in thread
From: Andrey Rybak @ 2006-03-31 12:08 UTC (permalink / raw)
To: ALT Linux Community
Kaydannik Axel пишет:
> Нет все проще господа.
>
> Работой телепатии я догадываюсь что у человека стоит ПРОЗРАЧНЫЙ сквиди
> все что касается 80 порта на внутреннем интерфейсе забрасывается на
> сквид. отсюда сквид когда к нему забрасывается на вход как бы выход (
> тобишь ШТМЛ контент) он теряется конечно же.
>
> Вывод.
> Сделать что бы именно с этой машины порты ни на какой сквид не форвардились
>
>
Есть такое правило, причем перед заворотом на сквид:
iptables -t nat -p TCP -A PREROUTING -s 0/0 -d 10.10.10.10/32 --dport 80 -j ACCEPT
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Comm] iptables rules?
2006-03-31 12:08 ` Andrey Rybak
@ 2006-04-05 7:25 ` Шенцев Алексей Владимирович
2006-04-05 12:18 ` Andrey Rybak
0 siblings, 1 reply; 13+ messages in thread
From: Шенцев Алексей Владимирович @ 2006-04-05 7:25 UTC (permalink / raw)
To: ALT Linux Community
В сообщении от 31 марта 2006 16:08 Andrey Rybak написал(a):
> iptables -t nat -p TCP -A PREROUTING -s 0/0 -d 10.10.10.10/32 --dport 80 -j
> ACCEPT
А не поможет ещё и добавление правила для форвардинга на/с этого сервака?
--
С уважением, Шенцев Алексей Владимирович (AShen)
E-mail: ashen@nsrz.ru
ICQ: 271053845
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Comm] iptables rules?
2006-04-05 7:25 ` Шенцев Алексей Владимирович
@ 2006-04-05 12:18 ` Andrey Rybak
0 siblings, 0 replies; 13+ messages in thread
From: Andrey Rybak @ 2006-04-05 12:18 UTC (permalink / raw)
To: ALT Linux Community
Шенцев Алексей Владимирович пишет:
> В сообщении от 31 марта 2006 16:08 Andrey Rybak написал(a):
>
>> iptables -t nat -p TCP -A PREROUTING -s 0/0 -d 10.10.10.10/32 --dport 80 -j
>> ACCEPT
>>
> А не поможет ещё и добавление правила для форвардинга на/с этого сервака?
>
Форвардинг не нужен, потому что трафик идет через сквид, а значит пакеты
не попадают в цепочку форварда, а попадают в INPUT&OUTPUT.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Comm] iptables rules?
2006-03-31 7:32 ` Kaydannik Axel
2006-03-31 10:31 ` Andrey Rybak
2006-03-31 12:08 ` Andrey Rybak
@ 2006-04-04 10:38 ` Andrey Rybak
2006-04-04 15:24 ` [Comm] iptables rules?[JT] Мерзляков Евгений Анатольевич
2 siblings, 1 reply; 13+ messages in thread
From: Andrey Rybak @ 2006-04-04 10:38 UTC (permalink / raw)
To: ALT Linux Community
Kaydannik Axel пишет:
> Нет все проще господа.
>
> Работой телепатии я догадываюсь что у человека стоит ПРОЗРАЧНЫЙ сквиди
> все что касается 80 порта на внутреннем интерфейсе забрасывается на
> сквид. отсюда сквид когда к нему забрасывается на вход как бы выход (
> тобишь ШТМЛ контент) он теряется конечно же.
>
> Вывод.
> Сделать что бы именно с этой машины порты ни на какой сквид не форвардились
>
Ну так именно это и не выходит. Так как?
Есть второе решение - заставить сквид пропускать html пакеты на и с этой
машины. Тоже не выходит.
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2006-04-05 17:42 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-30 14:22 [Comm] iptables rules? Andrey Rybak
2006-03-30 14:30 ` Dmitriy L. Kruglikov
2006-03-31 6:46 ` Rinat
2006-03-31 7:32 ` Kaydannik Axel
2006-03-31 10:31 ` Andrey Rybak
2006-03-31 10:44 ` Andrey Rybak
2006-03-31 12:08 ` Andrey Rybak
2006-04-05 7:25 ` Шенцев Алексей Владимирович
2006-04-05 12:18 ` Andrey Rybak
2006-04-04 10:38 ` Andrey Rybak
2006-04-04 15:24 ` [Comm] iptables rules?[JT] Мерзляков Евгений Анатольевич
2006-04-04 16:09 ` Andrey Rybak
2006-04-05 17:42 ` Michael Shigorin
ALT Linux Community general discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
public-inbox-index community
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.community
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git