PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Router routet WinXp Anfragen nicht weiter



Tobias Wendt
24.08.03, 19:08
Hallo @all,

Habe hier ein kleines Problem wo ich den ganzen Tag schon dran rum doctor. Voraus bin ein ziemlicher Anfänger!!!
Nun zum Prob: Habe hier ein Suse8.2 aufgesetzt mit einer FritzCard DSL, soweit läuft das Internet und Samba auf dem Linuxrechner. Dial on Demand funzt auch, ping 198.23usw oder www.xxxx.de geht von Linux auch, er wählt sich auch richtig an bis hier hin prima. Ein ping von Linux -> WinXp und umgekehrt geht auch. Der Zugriff auf Samba haut auch hin, bloß bekomme ich keine Internetverbindung vom WinXp hin, weder 198usw oder www.xxx.de funzt da richtig. Glaube habe irgendein Fehler im Routing gemacht bloß seh ich den vor lauter Zahlen nicht mehr:D .

Meine Server ip : 192.168.1.100
IP von WinXp : 192.168.1.99
Gw von Win : 192.168.1.100
DNS von Win : T-Online DNS 194.25.2.129

Deshalb poste ich mal meine ifconfig, route und mein iptables hier her und hoffe das jemand sie sieht die Fehler.

Deshalb Danke im vorraus:

ifconfig:
eth0 Protokoll:Ethernet Hardware Adresse 00:80:48:CA:53:FD
inet Adresse:192.168.1.100 Bcast:192.168.1.255 Maske:255.255.255.0
inet6 Adresse: fe80::280:48ff:feca:53fd/64 Gültigkeitsbereich:Verbindung
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:418 errors:0 dropped:0 overruns:0 frame:0
TX packets:32 errors:0 dropped:0 overruns:0 carrier:0
Kollisionen:0 Sendewarteschlangenlänge:100
RX bytes:33526 (32.7 Kb) TX bytes:9077 (8.8 Kb)
Interrupt:12 Basisadresse:0xd400

lo Protokoll:Lokale Schleife
inet Adresse:127.0.0.1 Maske:255.0.0.0
inet6 Adresse: ::1/128 Gültigkeitsbereich:Maschine
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:102 errors:0 dropped:0 overruns:0 frame:0
TX packets:102 errors:0 dropped:0 overruns:0 carrier:0
Kollisionen:0 Sendewarteschlangenlänge:0
RX bytes:6660 (6.5 Kb) TX bytes:6660 (6.5 Kb)

ppp0 Protokoll:Punkt-zu-Punkt Verbindung
inet Adresse:217.227.91.17 P-z-P:217.5.98.58 Maske:255.255.255.255
UP PUNKTZUPUNKT RUNNING NOARP MULTICAST MTU:1492 Metric:1
RX packets:137 errors:0 dropped:0 overruns:0 frame:0
TX packets:153 errors:0 dropped:1 overruns:0 carrier:0
Kollisionen:0 Sendewarteschlangenlänge:3
RX bytes:55563 (54.2 Kb) TX bytes:11524 (11.2 Kb)

route :
217.5.98.58 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
0.0.0.0 217.5.98.58 0.0.0.0 UG 0 0 0 ppp0

iptables mit Generator von Harry erstellt:
Tabelle filter
Chain INPUT (policy DROP 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 LOG all -- * * 0.0.0.0/0 0.0.0.0/0 state INVALID limit: avg 2/sec burst 5 LOG flags 0 level 4 prefix `INPUT INVALID '
0 0 DROP all -- * * 0.0.0.0/0 0.0.0.0/0 state INVALID
0 0 MY_DROP tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp flags:0x3F/0x00
0 0 MY_DROP tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp flags:0x03/0x03
0 0 MY_DROP tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp flags:0x06/0x06
0 0 MY_DROP tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp flags:0x05/0x05
0 0 MY_DROP tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp flags:0x11/0x01
0 0 MY_DROP tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp flags:0x18/0x08
0 0 MY_DROP tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp flags:0x30/0x20
0 0 ACCEPT all -- lo * 0.0.0.0/0 0.0.0.0/0
0 0 ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
0 0 ACCEPT tcp -- ppp0 * 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:443
0 0 ACCEPT tcp -- ppp0 * 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:110
0 0 ACCEPT tcp -- ppp0 * 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:53
0 0 ACCEPT udp -- ppp0 * 0.0.0.0/0 0.0.0.0/0 state NEW udp dpt:53
0 0 ACCEPT tcp -- ppp0 * 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:22
0 0 ACCEPT all -- eth0 * 0.0.0.0/0 0.0.0.0/0 state NEW
0 0 MY_REJECT all -- * * 0.0.0.0/0 0.0.0.0/0

Chain FORWARD (policy DROP 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 LOG all -- * * 0.0.0.0/0 0.0.0.0/0 state INVALID limit: avg 2/sec burst 5 LOG flags 0 level 4 prefix `FORWARD INVALID '
0 0 DROP all -- * * 0.0.0.0/0 0.0.0.0/0 state INVALID
0 0 MY_DROP tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp flags:0x3F/0x00
0 0 MY_DROP tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp flags:0x03/0x03
0 0 MY_DROP tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp flags:0x06/0x06
0 0 MY_DROP tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp flags:0x05/0x05
0 0 MY_DROP tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp flags:0x11/0x01
0 0 MY_DROP tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp flags:0x18/0x08
0 0 MY_DROP tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp flags:0x30/0x20
0 0 TCPMSS tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp flags:0x06/0x02 TCPMSS clamp to PMTU
0 0 ACCEPT all -- !ppp0 * 0.0.0.0/0 0.0.0.0/0 state NEW,RELATED,ESTABLISHED
0 0 ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
0 0 ACCEPT tcp -- ppp0 * 0.0.0.0/0 192.168.1.99 state NEW tcp dpt:80
0 0 MY_REJECT all -- * * 0.0.0.0/0 0.0.0.0/0

Chain OUTPUT (policy DROP 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 LOG all -- * * 0.0.0.0/0 0.0.0.0/0 state INVALID limit: avg 2/sec burst 5 LOG flags 0 level 4 prefix `OUTPUT INVALID '
0 0 DROP all -- * * 0.0.0.0/0 0.0.0.0/0 state INVALID
0 0 ACCEPT all -- * lo 0.0.0.0/0 0.0.0.0/0
0 0 ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 state NEW,RELATED,ESTABLISHED
0 0 MY_REJECT all -- * * 0.0.0.0/0 0.0.0.0/0

Chain MY_DROP (14 references)
pkts bytes target prot opt in out source destination
0 0 LOG all -- * * 0.0.0.0/0 0.0.0.0/0 limit: avg 2/sec burst 5 LOG flags 0 level 4 prefix `PORTSCAN DROP '
0 0 DROP all -- * * 0.0.0.0/0 0.0.0.0/0

Chain MY_REJECT (3 references)
pkts bytes target prot opt in out source destination
0 0 LOG tcp -- * * 0.0.0.0/0 0.0.0.0/0 limit: avg 2/sec burst 5 LOG flags 0 level 4 prefix `REJECT TCP '
0 0 REJECT tcp -- * * 0.0.0.0/0 0.0.0.0/0 reject-with tcp-reset
0 0 LOG udp -- * * 0.0.0.0/0 0.0.0.0/0 limit: avg 2/sec burst 5 LOG flags 0 level 4 prefix `REJECT UDP '
0 0 REJECT udp -- * * 0.0.0.0/0 0.0.0.0/0 reject-with icmp-port-unreachable
0 0 LOG icmp -- * * 0.0.0.0/0 0.0.0.0/0 limit: avg 2/sec burst 5 LOG flags 0 level 4 prefix `DROP ICMP '
0 0 DROP icmp -- * * 0.0.0.0/0 0.0.0.0/0
0 0 LOG all -- * * 0.0.0.0/0 0.0.0.0/0 limit: avg 2/sec burst 5 LOG flags 0 level 4 prefix `REJECT OTHER '
0 0 REJECT all -- * * 0.0.0.0/0 0.0.0.0/0 reject-with icmp-proto-unreachable
Tabelle nat
Chain PREROUTING (policy ACCEPT 483 packets, 25689 bytes)
pkts bytes target prot opt in out source destination
0 0 DNAT tcp -- ppp0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:80 to:192.168.1.99

Chain POSTROUTING (policy ACCEPT 149 packets, 9132 bytes)
pkts bytes target prot opt in out source destination
0 0 SNAT tcp -- * eth0 0.0.0.0/0 0.0.0.0/0 tcp dpt:80 to:192.168.1.100
0 0 MASQUERADE all -- * ppp0 0.0.0.0/0 0.0.0.0/0

Chain OUTPUT (policy ACCEPT 149 packets, 9132 bytes)
pkts bytes target prot opt in out source destination
Tabelle mangle
Chain PREROUTING (policy ACCEPT 1689 packets, 683K bytes)
pkts bytes target prot opt in out source destination

Chain INPUT (policy ACCEPT 1542 packets, 665K bytes)
pkts bytes target prot opt in out source destination

Chain FORWARD (policy ACCEPT 143 packets, 17736 bytes)
pkts bytes target prot opt in out source destination

Chain OUTPUT (policy ACCEPT 1387 packets, 200K bytes)
pkts bytes target prot opt in out source destination

Chain POSTROUTING (policy ACCEPT 1421 packets, 209K bytes)
pkts bytes target prot opt in out source destination


So falls was wichtiges fehlen sollte um mir zu helfen, bitte bescheid sagen wird prompt erledigt.

Danke
Tobias

Tobias Wendt
26.08.03, 20:57
..........schieb.......schieb....

Hallo nochmal, äh ma bitte nicht so auf die WWW-Adresse achten wahr ein sch...... Beispiel.

Aber hat keiner ne Tipp für mich woran ich scheitere??

mfg
Tobias

tattoo
27.08.03, 13:39
hallo,

ich meine das masquerading bei dir fehlt irgendwie,
das iptablesskript sieht auch ziemlich wild aus.

hier mal mein skript:

# Masquerading, Module
echo -n "Starte Masquerading... "
echo "1" > /proc/sys/net/ipv4/ip_forward
insmod ip_conntrack_ftp
insmod ip_nat_ftp

iptables -t nat -F POSTROUTING
iptables -t nat -A POSTROUTING -s $INTNET -o $EXTDEV -j MASQUERADE

# Forwarding, Tunneling

# Esel
iptables -t nat -A PREROUTING -p tcp -i $EXTDEV --dport 4661 -j DNAT --to 192.168.1.3
iptables -t nat -A PREROUTING -p tcp -i $EXTDEV --dport 4662 -j DNAT --to 192.168.1.3
iptables -t nat -A PREROUTING -p udp -i $EXTDEV --dport 4665 -j DNAT --to 192.168.1.3

# Webinterface
iptables -t nat -A PREROUTING -p tcp -i $EXTDEV --dport 8888 -j DNAT --to 192.168.1.3


# WinMX
# iptables -t nat -A PREROUTING -p tcp -i $EXTDEV --dport 6699 -j DNAT --to 192.168.1.3
# iptables -t nat -A PREROUTING -p udp -i $EXTDEV --dport 6257 -j DNAT --to 192.168.1.3

echo "..fertig"
echo -n "Starte Firewall.. "

# Firewall Regeln
iptables -N EXTDEV_FW_DROPLOGGED
iptables -F EXTDEV_FW_DROPLOGGED
iptables -A EXTDEV_FW_DROPLOGGED -m multiport -p tcp --dport 23,53,111,113,137,138,139,3128,1080,8080 -j REJECT
iptables -A EXTDEV_FW_DROPLOGGED -j DROP
iptables -N EXTDEV_FW
iptables -F EXTDEV_FW
iptables -A EXTDEV_FW -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A EXTDEV_FW -j DROP

# Verwerfe gefächte Addressen
iptables -t nat -A PREROUTING -i $EXTDEV -s 192.168.0.0/16 -j DROP
iptables -t nat -A PREROUTING -i $EXTDEV -s 10.0.0.0/8 -j DROP
iptables -t nat -A PREROUTING -i $EXTDEV -s 172.16.0.0/12 -j DROP
iptables -t nat -A PREROUTING -i $EXTDEV -s 127.0.0.0/8 -j DROP

# Beantworte "PING" nicht
# iptables -A INPUT -i $EXTDEV -p icmp -j REJECT
# iptables -A INPUT -p icmp -j DROP

# Port offen fuer SSH
iptables -A INPUT -i $EXTDEV -p tcp -d 0/0 -s 0/0 --dport 22 -j ACCEPT
# Port offen fuer FTP
iptables -A INPUT -i $EXTDEV -p tcp -d 0/0 -s 0/0 --dport 21 -j ACCEPT
# Port offen fuer HTTPD
iptables -A INPUT -i $EXTDEV -p tcp -d 0/0 -s 0/0 --dport 80 -j ACCEPT
# Webmin-Interface
iptables -A INPUT -i $EXTDEV -p tcp -d 0/0 -s 0/0 --dport 10000 -j ACCEPT

iptables -A INPUT -i $EXTDEV -j EXTDEV_FW

echo "..fertig"

adsl-start

ipactive_client

exit 0



hoffe, es hilft dir weiter

YoZ
27.08.03, 13:58
setze mal den gateway am router auf 0.0.0.0 und am client ( win XP ) die eth0 ip... falls du es nicht schon getan hast... was anderes fällt mir jetzt nicht ein.

Gruß, yoz

tattoo
27.08.03, 14:54
hallo,

wenn du folgendes in der konsole eingibst, MUSS es klappen:

iptables -F
echo "1" > /proc/sys/net/ipv4/ip_forward
insmod ip_conntrack_ftp
insmod ip_nat_ftp

iptables -t nat -F POSTROUTING
iptables -t nat -A POSTROUTING -s $INTNET -o $EXTDEV -j MASQUERADE

edit: du musst halt $intnet (z.b. eth1) und $extdev (z.b. ppp0) abändern

andernfalls stimmt an der tcp/ip - konfiguration was nicht.
:confused: :confused:

mfg tattoo

Tobias Wendt
27.08.03, 21:39
Hallo @all

Danke für die Antworten werde das morgen mal probieren! Werde das erstmal mit dem Gateway eintrag ändern.

Ok danke schon mal im Vorraus.

Super