Article View: pl.comp.os.bsd
Article #503dwa lacza, dwa gw, nat...
From: Newbie
Date: Wed, 07 Apr 2004 23:01
Date: Wed, 07 Apr 2004 23:01
63 lines
3071 bytes
3071 bytes
Na jedym dslu podzial i natowanie dziala idealnie. Ale jak teraz sprawic, zeby dzielil i natowal na obu dslach? Wiem, ze problemem jest tutaj default gw, ustawiony na IP_GW_1 Probowalem fwd'owac pakiety po divertcie (ipfw add divert 8669 ip from 192.168.4.0/24 to any out xmit rl1) ipfw add fwd IP_GW_2 ip from IP_ZEW_2 to any out via rl1 oraz mase roznych kombinacji fwd dodawalem nawet: route add -net IP_ZEW_2/32 IP_GW_1 ale bez rezultatow... Sposoby "dorzucenia" drugiego lacza czerpalem z google, oraz usenetu tudziez archiwum freebsd-isp, ale zaden sposob nie przynosi wlasciwego rezultatu. Aha, z zewnatrz na pingi nie odpowiada IP_ZEW_2.. Osprzet sieciowy itp..jak najbardziej dziala, wystarczy, ze zmienie default gw na IP_GW_2 i wszystko smiga na drugim dslu. FreeBSD 4.9-STABLE options IPFIREWALL options IPFIREWALL_VERBOSE options IPFIREWALL_FORWARD options IPFIREWALL_VERBOSE_LIMIT=100 options IPFIREWALL_DEFAULT_TO_ACCEPT options IPDIVERT options DUMMYNET options HZ=1000 options IPFW2 net.inet.ip.fw.one_pass=0 net.inet.ip.forwarding=1 net.link.ether.ipfw=1 (to bedzie mi potrzebne, do lapania po macu) rl0 - inet1 (dsl 1mbps) - IP_ZEW_1 wyjscie IP_GW_1 rl1 - inet2 (dsl 1mbps) - IP_ZEW_2 wyjscie IP_GW_2 rl2 - lan1 rl3 - lan2 defaultrouter=IP_GW_1 ipfw -f flush ipfw -f pipe flush ipfw add divert 8668 ip from any to IP_ZEW_1 in recv rl0 ipfw queue 1 config weight 1 pipe 10 buckets 256 queue 8KB mask dst-ip 0xffffffff ipfw pipe 10 config bw 980kbit/s queue 15KB ipfw add queue 1 ip from any to 192.168.3.0/24 in recv rl0 ipfw queue 2 config weight 1 pipe 20 buckets 256 queue 2KB mask src-ip 0xffffffff ipfw pipe 20 config bw 240kbit/s queue 6KB ipfw add queue 2 ip from 192.168.3.0/24 to any out xmit rl0 ipfw add divert 8668 ip from 192.168.3.0/24 to any out xmit rl0 ipfw add divert 8669 ip from any to IP_ZEW_2 in recv rl1 ipfw queue 11 config weight 1 pipe 110 buckets 256 queue 8KB mask dst-ip 0xffffffff ipfw pipe 110 config bw 980kbit/s queue 15KB ipfw add queue 12 ip from any to 192.168.4.0/24 in recv rl1 ipfw queue 12 config weight 1 pipe 120 buckets 256 queue 2KB mask src-ip 0xffffffff ipfw pipe 120 config bw 240kbit/s queue 6KB ipfw add queue 12 ip from 192.168.4.0/24 to any out xmit rl1 ipfw add divert 8669 ip from 192.168.4.0/24 to any out xmit rl1 ipfw add 65000 allow ip from any to any
Technical Details
Message-ID:
<c51vha$ma1$2@atlantis.news.tpi.pl>Path:
mbox-mo1.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mailShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail From: "Newbie" <no...@nospam.pl> Newsgroups: pl.comp.os.bsd Subject: dwa lacza, dwa gw, nat... Date: Thu, 8 Apr 2004 01:01:01 +0200 Organization: telnet Lines: 64 Message-ID: <c51vha$ma1$2@atlantis.news.tpi.pl> NNTP-Posting-Host: yk90.internetdsl.tpnet.pl X-Trace: atlantis.news.tpi.pl 1081377277 22849 80.55.244.90 (7 Apr 2004 22:34:37 GMT) X-Complaints-To: use...@tpi.pl NNTP-Posting-Date: Wed, 7 Apr 2004 22:34:37 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit