Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Router routet nicht
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
gwaybaba
n00b
n00b


Joined: 13 Jan 2003
Posts: 19

PostPosted: Mon May 30, 2005 12:02 pm    Post subject: Router routet nicht Reply with quote

Hallo,

ich hab mal wieder in Problem. Ich musste den Router am WE neustarten und seit dem bekomme ich, von innerhalb des Netztes, keine Verbindung zum Internet. Nur noch der Router hat eine funktionierende Verbindung.

Die DNS-Auflösung funktioniert noch, aber der Pingversuch endet immer mit einem Timeout (änhlich wie dieses Problem https://forums.gentoo.org/viewtopic-t-293675.html )

Ich habe die Firewalleinstellung auch schon wie dort angegeben ausprobiert, und selbst das Masqerading alleine als FW-Regel hat nicht funktioniert.

Meine Config:
eth0 -> LAN 192.168.0.1
eth1 -> WAN 192.168.1.1 (an DSL-Modem angeschlossen)
ppp0 -> Internet

Code:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
217.0.116.74    *               255.255.255.255 UH    0      0        0 ppp0
192.168.0.0     *               255.255.255.0   U     0      0        0 eth0
192.168.1.0     *               255.255.255.0   U     0      0        0 eth1
loopback        localhost       255.0.0.0       UG    0      0        0 lo
default         217.0.116.74    0.0.0.0         UG    0      0        0 ppp0

Code:

#!/bin/sh

  # Schnittstelle zum lokalen Netzwerk
  IFACE_INT=eth0

  # Internetschnittstelle
  IFACE_EXT=ppp0

  # Loopback device
  IFACE_LO=lo


# ++ POLICIES ++
# ++++++++++++

  # Default-Policies setzen - alles fliegt raus
  iptables -P INPUT DROP
  iptables -P FORWARD DROP
  iptables -P OUTPUT DROP

  # Einschalten von ip-Forwarding
  echo "1" > /proc/sys/net/ipv4/ip_forward


# ++ INCOMING ++
# ++++++++++++

  # Soll nicht sein
  iptables -A INPUT -p TCP ! --syn -m state --state NEW -j DROP

  # Vom internen Netz alles erlauben
  iptables -A INPUT -i $IFACE_INT -j ACCEPT

  # Vom Loopback Alles erlauben
  iptables -A INPUT -i $IFACE_LO -j ACCEPT

  # Vom Internet: Darf nicht sein
  iptables -A INPUT -i $IFACE_EXT  -s 10.0.0.0/8 -j DROP
  iptables -A INPUT -i $IFACE_EXT  -s 172.16.0.0/16 -j DROP
  iptables -A INPUT -i $IFACE_EXT  -s 192.168.0.0/24 -j DROP

  # Vom Internet Erlauben von bereits initialisierten Verbindungen
  iptables -A INPUT -i $IFACE_EXT  -m state --state ESTABLISHED,RELATED -j ACCEPT


# ++ FORWARDING ++
# +++++++++++++++

  # Lokal -> Internet: Alles erlauben
  iptables -A FORWARD -i $IFACE_INT -o $IFACE_EXT -j ACCEPT


  # Internet -> Lokales: Nur Verkehr über bereits bestehende Verbindungen erlauben
  iptables -A FORWARD -i $IFACE_EXT -o $IFACE_INT -m state --state ESTABLISHED,RELATED -j ACCEPT

# ++ OUTGOING ++
# ++++++++++++++

  # Ins lokale Netzwerk: Alles erlauben
  iptables -A OUTPUT -o $IFACE_INT -j ACCEPT

  # Ans Loopback: Alles erlauben
  iptables -A OUTPUT -o $IFACE_LO -j ACCEPT

  # Ins INternet : Alles erlauben
  iptables -A OUTPUT -o $IFACE_EXT -j ACCEPT

  # Ping erlauben
  iptables -A OUTPUT -p icmp -j ACCEPT
  iptables -A INPUT  -p icmp -j ACCEPT

# Masquerading
  iptables -A POSTROUTING -o $IFACE_EXT -t nat -j MASQUERADE


# Alles was bis hier kommt, mitprotokollieren
  iptables -A OUTPUT -j LOG --log-prefix "Nicht raus: "
  iptables -A FORWARD -j LOG --log-prefix "Nicht durch: "
  iptables -A INPUT -j LOG --log-prefix "Nicht rein: "



Diese Firewallregeln haben bis Freitag wunderbar funktioniert.
Back to top
View user's profile Send private message
gwaybaba
n00b
n00b


Joined: 13 Jan 2003
Posts: 19

PostPosted: Wed Jun 01, 2005 3:41 pm    Post subject: Reply with quote

Update

Es sieht so aus als ob das Masquerading nicht korrekt funktioniert.
ein Ausschnitt aus iptraf
Code:

┌28.0.0.0:4384                               =       3       144 S---   ppp0 
└www2.vip.ukl.yahoo.com:80                   =       0         0 ----   ppp0

er maskiert meine Adresse immer auf die 28.0.0.0.
Woher kommt diese Adresse und wie bekomme ich die wieder weg?
Back to top
View user's profile Send private message
m.b.j.
Guru
Guru


Joined: 12 Sep 2003
Posts: 407
Location: Germany (Essen)

PostPosted: Wed Jun 01, 2005 10:08 pm    Post subject: Reply with quote

echo "1" > /proc/sys/net/ipv4/conf/all/forwarding


ist wohl ein Problemlöser (hoffendlich)...
_________________
root@mbj # echo "sys-pizza/calzone -tunfish" >> /etc/paludis/use.conf
root@mbj # paludis -i calzone --dl-blocks discard
Back to top
View user's profile Send private message
gwaybaba
n00b
n00b


Joined: 13 Jan 2003
Posts: 19

PostPosted: Thu Jun 02, 2005 7:11 am    Post subject: Reply with quote

sorry das steht schon drin, war auch mein erster Gedanke.
Aber dadran lag es nicht.
Back to top
View user's profile Send private message
slick
Bodhisattva
Bodhisattva


Joined: 20 Apr 2003
Posts: 3495

PostPosted: Thu Jun 02, 2005 8:07 am    Post subject: Reply with quote

mal mit http://www.gentoo.org/doc/de/home-router-howto.xml verglichen? Evt. da was übersehen?
Back to top
View user's profile Send private message
gwaybaba
n00b
n00b


Joined: 13 Jan 2003
Posts: 19

PostPosted: Thu Jun 02, 2005 9:33 am    Post subject: Reply with quote

nach dem Howto hab ich den Router aufgebaut und der lief ja ein halbes Jahr lang.
Erst seit dem Neustart am WE funzt der nicht mehr.
Back to top
View user's profile Send private message
bbgermany
Veteran
Veteran


Joined: 21 Feb 2005
Posts: 1844
Location: Oranienburg/Germany

PostPosted: Thu Jun 02, 2005 1:44 pm    Post subject: Reply with quote

haste mal ein traceroute abgesetzt um zu sehen wie weit er kommt?
_________________
Desktop: Ryzen 5 5600G, 32GB, 2TB, RX7600
Notebook: Dell XPS 13 9370, 16GB, 1TB
Server #1: Ryzen 5 Pro 4650G, 64GB, 16.5TB
Server #2: Ryzen 4800H, 32GB, 22TB
Back to top
View user's profile Send private message
gwaybaba
n00b
n00b


Joined: 13 Jan 2003
Posts: 19

PostPosted: Thu Jun 02, 2005 3:17 pm    Post subject: Reply with quote

das Traceroute kommt nur bis zum Router.

Eine Umgehung von dem Problem hab ich gefunden.
Und zwar wenn ich statt des Masquerading ein Source NAT auf ppp0 (bzw die IP von ppp0) mache funktioniert das.
Also is das Modul vom Masquerading defekt.
Back to top
View user's profile Send private message
Anarcho
Advocate
Advocate


Joined: 06 Jun 2004
Posts: 2970
Location: Germany

PostPosted: Fri Jun 03, 2005 5:43 am    Post subject: Reply with quote

Na, im zweifelsfall dann mal iptables neukompilieren und eventuell auch mal den Kernel mit den Modulen neu kompilieren und installieren.
_________________
...it's only Rock'n'Roll, but I like it!
Back to top
View user's profile Send private message
flash49
Apprentice
Apprentice


Joined: 12 Feb 2005
Posts: 233

PostPosted: Fri Jun 03, 2005 9:54 am    Post subject: Reply with quote

Hast du einen neuen Kernel drauf, der vieleicht erst jetzt gebootet wurde? In den neuen Kernels sind einige iptables-Optionen hinzugekommen für die man die neuen userspace tools braucht.
:!: Kernel 2.6.9 sowie 2.6.10 haben außerdem noch einige kleine Bugs in der iptables Implementierung. Von 2.6.8.1 zu 2.6.9 wurde einiges dort umgebaut.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum