IPFW+FWD+MAC

Настройка сетевых служб, маршрутизации, фаерволлов. Проблемы с сетевым оборудованием.
Правила форума
Убедительная просьба юзать теги [code] при оформлении листингов.
Сообщения не оформленные должным образом имеют все шансы быть незамеченными.
_kirill_
ст. сержант
Сообщения: 311
Зарегистрирован: 2007-05-11 9:41:21
Откуда: Tashkent
Контактная информация:

IPFW+FWD+MAC

Непрочитанное сообщение _kirill_ » 2007-10-11 15:47:45

Здраствуйте! Ни кто не подскажет, как в ipfw форвардить трафик по маку? В принцыпе мне нужно примерно такое весь трафик определенного мака на веб переадрисовывать на локальный сервер. Или как можно это реализовать в сквиде? Спасибо.

Хостинговая компания Host-Food.ru
Хостинг HostFood.ru
 

Услуги хостинговой компании Host-Food.ru

Хостинг HostFood.ru

Тарифы на хостинг в России, от 12 рублей: https://www.host-food.ru/tariffs/hosting/
Тарифы на виртуальные сервера (VPS/VDS/KVM) в РФ, от 189 руб.: https://www.host-food.ru/tariffs/virtualny-server-vps/
Выделенные сервера, Россия, Москва, от 2000 рублей (HP Proliant G5, Intel Xeon E5430 (2.66GHz, Quad-Core, 12Mb), 8Gb RAM, 2x300Gb SAS HDD, P400i, 512Mb, BBU):
https://www.host-food.ru/tariffs/vydelennyi-server-ds/
Недорогие домены в популярных зонах: https://www.host-food.ru/domains/

Аватара пользователя
Alex Keda
стреляли...
Сообщения: 35456
Зарегистрирован: 2004-10-18 14:25:19
Откуда: Made in USSR
Контактная информация:

Re: IPFW+FWD+MAC

Непрочитанное сообщение Alex Keda » 2009-03-08 23:04:50

ipfw вроде умеет по макам работать...
Убей их всех! Бог потом рассортирует...

Аватара пользователя
skeletor
майор
Сообщения: 2548
Зарегистрирован: 2007-11-16 18:22:04

Re: IPFW+FWD+MAC

Непрочитанное сообщение skeletor » 2009-03-10 14:45:32

Форвардить не получится. Только блочить/разрешать.
Выдержка из мана.

Код: Выделить всё

     fwd | forward ipaddr | tablearg[,port]
             Change the next-hop on matching packets to ipaddr, which can be
             an IP address or a host name.  The next hop can also be supplied
             by the last table looked up for the packet by using the tablearg
             keyword instead of an explicit address.  The search terminates if
             this rule matches.

             If ipaddr is a local address, then matching packets will be for-
             warded to port (or the port number in the packet if one is not
             specified in the rule) on the local machine.
             If ipaddr is not a local address, then the port number (if speci-
             fied) is ignored, and the packet will be forwarded to the remote
             address, using the route as found in the local routing table for
             that IP.
             A fwd rule will not match layer-2 packets (those received on
             ether_input, ether_output, or bridged).
             The fwd action does not change the contents of the packet at all.
             In particular, the destination address remains unmodified, so
             packets forwarded to another system will usually be rejected by
             that system unless there is a matching rule on that system to
             capture them.  For packets forwarded locally, the local address
             of the socket will be set to the original destination address of
             the packet.  This makes the netstat(1) entry look rather weird
             but is intended for use with transparent proxy servers.

             To enable fwd a custom kernel needs to be compiled with the
             option options IPFIREWALL_FORWARD.