|
ru.unix.bsd- RU.UNIX.BSD ------------------------------------------------------------------ From : Slawa Olhovchenkov 2:5030/500 09 Sep 2005 15:00:36 To : Gleb Smirnoff Subject : dhcp на ppp интерфейсе -------------------------------------------------------------------------------- 09 Sep 05, Slawa Olhovchenkov writes to Gleb Smirnoff: SO>>>>>> Блин, основная проблема с реализацией -- то, что интерфейс на SO>>>>>> момент старта dhcpd -- в дауне. GS>>>>> Да, проблема действительно концептуальная. Hаверное нужно похачить GS>>>>> ppp или mpd, что бы они поднимали интерфейс до того, как на нём GS>>>>> появится IP адрес. SO>>>> Hа самом деле дальше тоже некоторые проблемы есть -- последние SO>>>> версии isc-dhcpd все равно такой интерфейс не признают. А старые SO>>>> хоть и признают, но не работают. Может в mpd вставить udp helper? GS>>> Какой udp helper? SO> И вообще я не понимаю, какого черта на эти пакеты не действует ipfw fwd? О, это просто утонченное издевательство. http://www.bsdnews.org/01/game_vpn.php Forwarding Broadcasts As mentioned earlier, UDP broadcasts are not forwarded across interfaces. To resolve this problem we can use a PERL script found here[http://www.bsdnews.org/downloads/game_vpn/bcastd.pl.txt]. This script requires NetPacket::IP, NetPacket::UDP and a modified version of the Net::Divert module which can be found [http://www.bsdnews.org/downloads/game_vpn/Net-Divert-0.01a.tgz] until the author integrates these changes into the official distribution. The script listens for packets on a specified port and upon receiving them, rewrites the destination field in the packet's header and then sends a copy to all of the hosts in a list. To figure out what IP to add to the list of recipients, we have to find out what IP the game uses to announce itself. Since this is what we did when setting up routing, we can just refer to that data. Note that all players should be added in this file independent of whether they needed static routes or not. In addition to executing the script, we also have to add ipfw rules to forward broadcasts that we receive from the VPN clients to our script. ipfw add divert 9999 udp from any to 255.255.255.255 via fxp0 ipfw add divert 9999 udp from any to 255.255.255.255 via ng0 ipfw add divert 9999 udp from any to 255.255.255.255 via ng1 The above rules divert all broadcasts received on the internal network interface fxp0 and on the vpn interfaces ng0 and ng1 to the script. If we expect more players we should add corresponding entries for ng2, ng3 and so on. ... Что скажут о тебе другие, коли ты сам о себе ничего сказать не можешь? --- GoldED+/BSD 1.1.5 * Origin: (2:5030/500) Вернуться к списку тем, сортированных по: возрастание даты уменьшение даты тема автор
Архивное /ru.unix.bsd/222143216bd4.html, оценка из 5, голосов 10
|