Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Iptables... NAT und MASQUERAD
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
RoyalRob
n00b
n00b


Joined: 11 Sep 2004
Posts: 27

PostPosted: Thu Sep 30, 2004 7:46 pm    Post subject: Iptables... NAT und MASQUERAD Reply with quote

Hallo!

Es geht immernoch darum, mit meinen Notebook über meinen Pc ins Netz zu kommen...

eth0 = Mit dem DSL Modem verbunden
eth1 = 192.168.0.2
Notebook = 192.168.0.3 --> Gateway 192.168.0.2

Wenn ich von meinem Notebook einen Pink auf die 192.168.0.2 mache, dann funktioniert dies... wenn ich aber den IE oeffne um ins Netz zu kommen, dann scheint es mir so, dass er Daten anfodert der PC sie ihm aber nicht schickt.

Ich habe die Einstellungen aus der Home-Router How-to für Iptables übernommen... ich weiss aber nicht genau, ob der PC diese auch nimmt, da in meinem /etc/ppp Verzeichnis eine Datei namens Firewall-masq ist... in dieser steht aber was von IpChains.

Kann mir jemand sagen, warum der Ping funktioniert aber das surfen nicht... oder wo ich einen Fehler gemacht habe?
Back to top
View user's profile Send private message
himpierre
l33t
l33t


Joined: 31 Aug 2002
Posts: 865
Location: Berlin

PostPosted: Thu Sep 30, 2004 8:19 pm    Post subject: Reply with quote

Das hier sollte tun:

Code:

echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -i eth0 -A INPUT -m state --state NEW,INVALID -j DROP
iptables -i eth0 -A FORWARD -m state --state NEW,INVALID -j DROP


cheers
t.


Last edited by himpierre on Thu Sep 30, 2004 8:19 pm; edited 1 time in total
Back to top
View user's profile Send private message
holla die waldfee
Tux's lil' helper
Tux's lil' helper


Joined: 17 Sep 2003
Posts: 85

PostPosted: Thu Sep 30, 2004 8:19 pm    Post subject: Re: Iptables... NAT und MASQUERAD Reply with quote

RoyalRob wrote:

Kann mir jemand sagen, warum der Ping funktioniert


weil der pc sich standardkonform verhällt. icmp verkehr wird von dem router nicht gedroppt.

RoyalRob wrote:

... aber das surfen nicht... oder wo ich einen Fehler gemacht habe?


sorry wenn ich das jetzt mal so sage aber:

- du wirst entweder nicht richtig das how-to gelesen haben
- du hast die sichfunktion im forum nicht benutzt
- du hast google nicht benutzt

unverständliche grüße
holla
Back to top
View user's profile Send private message
RoyalRob
n00b
n00b


Joined: 11 Sep 2004
Posts: 27

PostPosted: Thu Sep 30, 2004 8:38 pm    Post subject: Re: Iptables... NAT und MASQUERAD Reply with quote

[quote="holla die waldfee"]
RoyalRob wrote:


sorry wenn ich das jetzt mal so sage aber:

- du wirst entweder nicht richtig das how-to gelesen haben
- du hast die sichfunktion im forum nicht benutzt
- du hast google nicht benutzt

unverständliche grüße
holla


1. Das How-to, habe ich mir sogar mehrmals durchgelesen...
2. Ich habe Bücher gewelzt, ob ich etwas finde...
3. Habe ich mehrere Foren durchsucht...
4. Als ich mich an das How-To gehalten habe, wurde mir immer ein Fehler angezeigt, wenn ich den DHCP starten wollte... und es lag an einer Einstellungen, wie sie im How-To stand.

@himpierre

Code:
iptables -i eth0 -A INPUT -m state --state NEW,INVALID -j DROP
iptables -i eth0 -A FORWARD -m state --state NEW,INVALID -j DROP


wenn ich das eingebe, dann bekomme ich die meldung... 'iptables: No chain/target/match by that name'
Back to top
View user's profile Send private message
kruemel0809
Tux's lil' helper
Tux's lil' helper


Joined: 21 Sep 2004
Posts: 124

PostPosted: Fri Oct 01, 2004 8:14 am    Post subject: Reply with quote

hast du das im howto gefixed??
Back to top
View user's profile Send private message
schmutzfinger
Veteran
Veteran


Joined: 26 Oct 2003
Posts: 1287
Location: Dresden/Germany

PostPosted: Fri Oct 01, 2004 10:07 am    Post subject: Reply with quote

Naja ich denke mal es liegt am DNS. Pinge mal von einem rechner dessen pakete gerouted eine ip im internet an, wenn das geht dann fehlt dir einfach nur DNS.
Um das problem zu lösen gibt es zwei ansätze, entweder du trägst auf den rechnern hinter dem router fest die ip des providernameservers ein. Oder du installierst auf dem gateway noch einen DNS server und trägst dann deine gateway ip als DNS server beim client ein.
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