Jump to content

Sharing Internet Connection [solved]


Guest h.houdini
 Share

Recommended Posts

Guest h.houdini

Hi, this is my first message here. :)

 

I'm trying to share an ADSL connection between two computers, a Mandriva 2006 (kernel 2.6.12-12 mdk), directly connected to Internet, and a Win 98( it's not mine). They are linked by a crossed network cable.

I configured ppp0 on eth0.

eth1, where the cable between the two computers is hanging, has IP address 192.168.0.1(subnet mask 255.255.255.0), while the win98 has ip address 192.168.0.2 (subnet mask 255.255.255.0).

To enable IP-forwarding, i give the command

echo 1 > /proc/sys/net/ipv4/ip_forward

,

To enable NAT, i give the command

iptables -t nat -I POSTROUTING -o ppp0 -j MASQUERADE

 

On the win98 computer, i use the same DNS as in my /etc/resolv.conf; as gateway, I indicated 192.168.0.1.

From this computer, i can ping the gateway without problem, but:

 

1)when one tries to get to some sites, some can be seen (for example, www.google.com), while other not (for example, www.hattrick.org or www.repubblica.it): it gives a time-out error (in Mandriva, I can see any of these sites without problem)

2) I can't ping DNS server(but I can ping eth0 and eth1). I also con ping the address of the not-resolved sites, but if I use that address in the browser the request goes time-out.

 

I tried with other OS and computer (Laptop with XP), but thing are just the same (so, I think that the problem is myMandriva, that blocks some traffic). I provisionally disabled iptables (I'm not vey happy with this :whistle: ).

I also tried to reinstall the kernel, but the result is the same.

 

Can anyone help me? I really can't understand what's happening :(

Edited by h.houdini
Link to comment
Share on other sites

  • 4 weeks later...
Guest flummer

Hey,

I've got the same problem, did you ever find a solution for it ?

I can connect on my client to webpages like google.com. But no www.di.fm and messenger 7.5 doesn't work either.

It works fine on the Mandrive Desktop, or if I use a hardware router.

Can someone please help, i'm going out of my mind here.

 

BR

Flummer

Link to comment
Share on other sites

Guest flummer

Okay problem solved.

By some reason you need to add this rule :

 

iptables -I FORWARD -i eth0 -o ppp0 -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu

 

Where eth0 is your internal interfase and ppp0 is your dail-up adsl connection.

Don't know why this is needed to get it running, maybe someone can explain ?!

Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...