Internet sharing problem (Solved, sorta)

Booting, installing, newbie
Post Reply
Message
Author
MaZZly
Posts: 23
Joined: Fri 14 Dec 2007, 21:16

Internet sharing problem (Solved, sorta)

#1 Post by MaZZly »

ok, here is my setup:

eth0: internet (ADSL) from router, RJ45
eth1: local network (Xp dekstop computer, xp comp: 192.168.0.2)


in puppy linux i set eth0 to DHCP and internet works fine on the computer.
i do "ifconfig eth1 192.168.0.1 broadcast 192.168.0.255 netmask 255.255.255.0" to setup the eth1 card and then run the "set up firewall", and sets it to share the internet to local network, the guide runs rc.firewall and it shares the internet to the network

the problem is that on my xp system 9 out of 10 pages wont load (roughly estimated). on the xp machine i have the same settings as i had when i ran smoothwall on it and the same as when i ran Ubuntu with firestarter on it, but with puppylinux (and DSL) i have this problem
www.google.com always works, but if i google for something and try the 10 first matches, hardly one page will load up.
first i thought it was the rc.firewall script but even if i just set up eth0 and eth1 and then do the "iptables -t nat -A POSTROUTING -o "eth0" -j MASQUERADE" it will still be the same problem

do you have any ideas why this happens to me? (both in Puppy and in DSL)

User avatar
Béèm
Posts: 11763
Joined: Wed 22 Nov 2006, 00:47
Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win

#2 Post by Béèm »

Why don't you plug the XP PC in the router directly?
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
[url=http://puppylinux.org/wikka/HomePage]Consult Wikka[/url]
Use peppyy's [url=http://wellminded.com/puppy/pupsearch.html]puppysearch[/url]

MaZZly
Posts: 23
Joined: Fri 14 Dec 2007, 21:16

#3 Post by MaZZly »

becouse i want to use the linux computer as a firewall/router instead of the routers inbuilt firewall..

User avatar
HairyWill
Posts: 2928
Joined: Fri 26 May 2006, 23:29
Location: Southampton, UK

Re: Internet sharing problem

#4 Post by HairyWill »

MaZZly wrote:even if i just set up eth0 and eth1 and then do the "iptables -t nat -A POSTROUTING -o "eth0" -j MASQUERADE" it will still be the same problem
It might just be unfamiliarity with english but the tense in this suggests that you haven't actually tried iptables.
I suggest you do and look here
http://www.murga-linux.com/puppy/viewtopic.php?t=18129
though I think you understand this already.

The intermittent failure might be caused by slow response to dns queries. It might be a problem with the details forwarded by your dhcp server
try ping and traceroute to your dns servers
what do you have in /etc/resolv.conf
is it just results from google queries that cause problems?
if you hardcode some entries into your hosts file do they work better?

Out of interest why are you replacing smoothwall? I thought it was supposed to be very good.
Will
contribute: [url=http://www.puppylinux.org]community website[/url], [url=http://tinyurl.com/6c3nm6]screenshots[/url], [url=http://tinyurl.com/6j2gbz]puplets[/url], [url=http://tinyurl.com/57gykn]wiki[/url], [url=http://tinyurl.com/5dgr83]rss[/url]

MaZZly
Posts: 23
Joined: Fri 14 Dec 2007, 21:16

#5 Post by MaZZly »

i'll try to traceroute the dns tomorrow (or tonight if im not too tired)
i'll have to check the /etc/resolv.conf later too, i only run the puppy live when i try these settings, but i dont think that causes my problems.
the google queries was just an example, its the same with my favourite sites, only 1 or 2 of them work. and everytime i try to setup puppy with masquerading the sites that doesnt work are different. (sometimes one site work, but next time with the same settings the other site works.)

im replacing smoothwall couse i'd like to do some other things on the computer too, and Ubuntu ran to damn slow on the comp so... but puppylinux (and DSL) ran very nice and fast on it. but i prefer puppy since it looks more stylish :D

MaZZly
Posts: 23
Joined: Fri 14 Dec 2007, 21:16

#6 Post by MaZZly »

traceroute & ping:
to www.google.com: seems normal from both computers
to sites that doesnt work on xp machine: on xp machine it says that there are no such addresses to ping/tracert
if i try to tracert/ping these sites in puppy they seem normal

/etc/resolv.conf:

Code: Select all

nameserver 10.0.0.2 #this is the ip to my router
if you hardcode some entries into your hosts file do they work better?
I dont really know what you mean/how to do that

User avatar
HairyWill
Posts: 2928
Joined: Fri 26 May 2006, 23:29
Location: Southampton, UK

#7 Post by HairyWill »

The fact that some sites work makes feel that the problem does not lie with the puppy machine.

Do ping and tracert on XP work if you use ip addresses?

The intermittent nature of the problem is probably because the XP dns cache is resolving some of the addresses. If you do ipconfig /flushdns on the XP machine I bet that no addresses will resolve.

I would now check out the tcp/ip properties in XP an see what entries it has for dns servers.

I find it interesting that your puppy machine has the router as its dns server. My router just tells puppy the address of the ISPs dns servers that it uses. I don't have enough experience to know what is normal.
Will
contribute: [url=http://www.puppylinux.org]community website[/url], [url=http://tinyurl.com/6c3nm6]screenshots[/url], [url=http://tinyurl.com/6j2gbz]puplets[/url], [url=http://tinyurl.com/57gykn]wiki[/url], [url=http://tinyurl.com/5dgr83]rss[/url]

MaZZly
Posts: 23
Joined: Fri 14 Dec 2007, 21:16

#8 Post by MaZZly »

well i'll try to dnsflush tomorrow and see if it does ping/tracert www.google.com

the xp machine's ip configuration works with ubuntu+firestarter and with smoothwall. so i dont see why it wouldnt work with puppy or DSl..

when i try to load a site it does almost instantly load up the 404 error page. msn messenger does not work either when i run with puppy..

User avatar
HairyWill
Posts: 2928
Joined: Fri 26 May 2006, 23:29
Location: Southampton, UK

#9 Post by HairyWill »

Are the static addresses you are using colliding with those issued by the dhcp server?
You might consider getting the XP machine to use dhcp and/or bumping up the static address to at least 192.168.0.20
Will
contribute: [url=http://www.puppylinux.org]community website[/url], [url=http://tinyurl.com/6c3nm6]screenshots[/url], [url=http://tinyurl.com/6j2gbz]puplets[/url], [url=http://tinyurl.com/57gykn]wiki[/url], [url=http://tinyurl.com/5dgr83]rss[/url]

MaZZly
Posts: 23
Joined: Fri 14 Dec 2007, 21:16

#10 Post by MaZZly »

how can i check if they are colliding with the servers DHCP addresses?

how to set the puppy machine to share internet with DHCP

i'll try later on today to set the ip on the xp machine to a higher value..

User avatar
HairyWill
Posts: 2928
Joined: Fri 26 May 2006, 23:29
Location: Southampton, UK

#11 Post by HairyWill »

I tried to do a similar thing the other night and couldn't get it to work (I had no internet access for research).
A few things stand out to me though I'm not sure how much further help I can offer.

I think that eth1 may be working as a nat router you appear to have two distinct address ranges 10.0.0..... 192.168.0...... I don't know if it is possible but if you can get it all working on the same subnet then maybe using bridge-utils would be better
http://www.linux-foundation.org/en/Net:Bridge
then the XP machine could just use the dhcp server in your ADSL router

what do you get for ifconfig on puppy?
Will
contribute: [url=http://www.puppylinux.org]community website[/url], [url=http://tinyurl.com/6c3nm6]screenshots[/url], [url=http://tinyurl.com/6j2gbz]puplets[/url], [url=http://tinyurl.com/57gykn]wiki[/url], [url=http://tinyurl.com/5dgr83]rss[/url]

Bruce B

#12 Post by Bruce B »

I guess what I have to say, is that it seems more advantageous (to me) to setup a proxy server over an ICS server.

User avatar
HairyWill
Posts: 2928
Joined: Fri 26 May 2006, 23:29
Location: Southampton, UK

#13 Post by HairyWill »

some reading
http://www.murga-linux.com/puppy/viewtopic.php?t=477
http://www.murga-linux.com/puppy/viewtopic.php?t=15129
and this one looks particularly fruitful
http://www.murga-linux.com/puppy/viewtopic.php?t=5340
MU provides a link for a bridge-utils dotpup
http://dotpups.de/dotpups/System_Utilities/
It looks like you will need to get the bridge module working. I just tried unsuccessfully just now on 3.01. I think the bridge.o provided by tempestuous in march 06 will not work with more recent kernels.

Bruce
Is there a howto about on setting up a proxy in puppy? I couldn't find one. If all that is needed is a net connection, isn't a proxy overkill?
Will
contribute: [url=http://www.puppylinux.org]community website[/url], [url=http://tinyurl.com/6c3nm6]screenshots[/url], [url=http://tinyurl.com/6j2gbz]puplets[/url], [url=http://tinyurl.com/57gykn]wiki[/url], [url=http://tinyurl.com/5dgr83]rss[/url]

Bruce B

#14 Post by Bruce B »

HairyWill wrote:
Bruce
Is there a howto about on setting up a proxy in puppy? I couldn't find one. If all that is needed is a net connection, isn't a proxy overkill?
Will,

On a Local Area Network, the client computers don't need an Internet connection and it might be to your advantage that they didn't have one.

All you need is one computer that has an Internet connection. The clients connect via proxy settings. In many cases even an operating system would think the client computers are offline. Thus it may not even try its usual phone home shenanigans.

A decent proxy is about simplicity and control. The control factor is big, because the proxy administrator really does know everything in terms of connections from the network to the Internet via its log files. He can also control the unwanted connections. Phone home programs will get caught in their tracks.

Linux has pretty well got data control from the outside in. But adding a proxy server controls from the inside out. The basic flow of data is data in, data out. When you can control it all, you're informed and safe.

Regards,

Bruce

MaZZly
Posts: 23
Joined: Fri 14 Dec 2007, 21:16

#15 Post by MaZZly »

i got it working now, dont know for sure what i did but atleast i:

1. installed puppy to harddrive

2. installed:
http://www.murga-linux.com/puppy/viewtopic.php?t=15129

but now to get it working i have to run network wizard on eth0 and press auto DHCP for it to find the net. then after i've done that it works like a charm,

any solution to get it auto DHCP at startup?

Post Reply