Problem mit dem Isdn_Dial-In-Gateway-Router
Hi ! Hi ! Ich hab ja dieses kleine Netzwerk mit nem Windows und einem LInux-PC (demnächst soll noch ein dritter WinPC dazukommen). Und ich möchte, das sich 'WinPC1' über 'LinuxPC' ins Internet Einwählt: Die Ethernet-Verbindung klappt Problemlos - ich kann zb. absolut problemlos vom Win-PC auf den Apache des Linux-Rechners zugreifen ect. WinPC1 IP 192.168.0.1 Win98 LinuxPC IP 192.168.0.2 SuSE Linux 6.2 - Kernel 2.2.10 WinPC2 IP 192.168.0.3 Win98 Ich möchte den Linux PC als Einwahl-Gateway benutzen. Die PCs sind alle über ne 10MBit BNC-Leitung vernetzt. Im Linux-PC ist ne Fritz Card PCI. Das Automatische Einwählen auf dem localen Linux-Server klappt schonmal - ich komm jedenfalls damit ins Inet. Aber das Routing - das klappt nicht. Und jetzt meine Frage: Um aus meinem Linux-PC einen Isdn- Einwahl-Server zu machen, muss ich doch eigenltich 'nur' mit ipchains eine Chain für forward einrichten oder muss ich noch etwas anderes machen ? Ich hab mir also folgendes kleines Shell-Script geschrieben. Beim Ausführen gibts keine Probleme oder Fehlermeldungen - auch nix an Fehlern in der messages- oder in der warn-Datei. Das script soll erstmal nur einem PC das Routing ermöglichen, um das ganze etwas übersichlicher für mich zu machen ---snip--- # das forwarding erlauben echo 1 > /proc/sys/net/ipv4/ip_forward # jetzt Regeln aufsetzten ipchains -A forward -s 192.168.0.1/0 -p icmp -j DENY ipchains -A input -s 192.168.0.1/0 -p icmp -j DENY ipchains -A output -s 192.168.0.1/0 -p icmp -j DENY ipchains -D forward -s 192.168.0.1/0 -p icmp -j DENY ipchains -D input -s 192.168.0.1/0 -p icmp -j DENY ipchains -D output -s 192.168.0.1/0 -p icmp -j DENY ---snap--- Vielleicht liegt es ja an der rc.config - hier mal das wichtigste: FW_ROUTER <leer> FW_START <no> # weil das ja alles mein Script machen soll.. START_ROUTED <no> # hab gelesen, das man das bei ipchains auf no stellen soll. --- # hier bin ich mir nicht sicher, ob das sooo richtig ist - ich hab die Werte # alle aus Yast entnommen... MSQ_NETWORKS <192.168.0.0/12> MSQ_START <no> --- Den Kernel hab ich übrigends gestern neu komliliert, genau nach einem Buch über die ipchains-FW - da müsste eigentlich alles richtig drin seien. MfG Steffen Wendzel.
Hi
ipchains -A forward -s 192.168.0.1/0 -p icmp -j DENY Ich denke, Du hast die falsche Netzmaske (0) angegeben, die müßte für Rechner so lauten 192.168.0.1/32, ich würde eigendlich auch ein anderes subnet wählen, z.B 192.168.1.0/24 (class C mit max 255 Rechnern sollte reichen)
Zum Masquerading: Welche Policy haben Deine Chains? Zum Testen würde ich auf die professionell Variant verzichten, und erstmal sehen das Du die Verbindung hinkriegst - d.h kein filtern, sondern nur masq, also default policy für alle Verbindungen ist ACCEPT -, später wäre firewall-Piercing sicher nicht verkehrt. Hier ein Masquerading vorschlag: Wenn Du eine user-defined chain masq_0 generierst, tust Du dich beim späteren ausbau leicher, du kannst gezilter entscheiden was du nach aussen lassen willst, indem Du es in dieser chain angibst (Reihenfolge!) ipchains -N out-1 Dann schicke alles was aus dem internen Netzwerk kommt, aber nicht ins interne Netzwerk will, und zum Verlassen des Netzwerks die erste ISDN-Verbindung benutzt, in die benutzerdefinierte chain f+ür auswärzgerichtete Verbindungen: ipchains -A forward -s 192.168.1.0/32 -d ! 192.168.1.0/32 -i ippp0 -j out-1 In der out-chain schließlich: maskiere alle Verbindungen ipchains -A out-1 -j MASQ So soltest Du eigendlich diene Winbox (wenn die Route auf selbiger richtig gesetzt ist) erstmal ins Internet bringen. Noch 'n Tip: ipchains-save/ipchains-restore lässt Dich Deine Kommandozeilentests abspeichern und hilft Dir, Dein Script zu modularisieren. ciao z.
On Tue, 29 May 2001, Steffen Wendzel wrote:
Hi !
Hi ! Ich hab ja dieses kleine Netzwerk mit nem Windows und einem LInux-PC (demnächst soll noch ein dritter WinPC dazukommen). Und ich möchte, das sich 'WinPC1' über 'LinuxPC' ins Internet Einwählt: Die Ethernet-Verbindung klappt Problemlos - ich kann zb. absolut problemlos vom Win-PC auf den Apache des Linux-Rechners zugreifen ect.
WinPC1 IP 192.168.0.1 Win98 LinuxPC IP 192.168.0.2 SuSE Linux 6.2 - Kernel 2.2.10 WinPC2 IP 192.168.0.3 Win98
Hallo Steffen, wenn deine IP-Chains-Regeln alle korrekt sind und du trotzdem nicht hinaus kommst, liegt es möglicherweise daran, dass du in den Netzwerk- einstellungen deiner Windows-Rechner den Linux-PC nicht als Gateway angegeben hast. Außerdem musst du den Windows-Rechnern noch in den DNS-Einstellungen einen Name-Server-Eintrag spendieren, sonst kannst du zwar auf bekannte IP-Nummern zugreifen, aber es erfolgt keine Namensaufloesung (z.B. von www.suse.de) zur entsprechenden IP-Nummer! So long Michael
Hallo, da hat doch gerade jemand "MEIN" Problem gelöst ?? nach kompilieren & einspielen der AVM Capifax funkt mein I4l nicht mehr ?? Wo habe ich diesmal wieder etwas übersehen ??? Übrigens wie bringt man eine AVM Fritzclassic und eine ELSA QS 3000 gemeinsam zum laufen ?? Will bei mir nicht kann machen was ich will ?? Gruß und Dank Günther
participants (4)
-
Günther J.Niederwimmer
-
Mischa.L.Schmidt@t-online.de
-
steffenwendzelhomepage@t-online.de
-
Zoltan.Bogdan@t-online.de