LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-09-2008, 07:41 AM   #1
Sepero
Member
 
Registered: Jul 2004
Location: Tampa, Florida, USA
Distribution: Ubuntu
Posts: 734
Blog Entries: 1

Rep: Reputation: 33
I can ping, but I cannot download


Following this guide:
https://help.ubuntu.com/community/In...nectionSharing

I'm trying to setup internet connection forwarding.

From the client, I can ping google.com and other computers on the local network, but I cannot download anything.

I have absolutely no idea why it is not working. As far as I can tell I have followed the guide to the letter.

I am using Ubuntu Intrepid 8.10

My gateway is eth0
My client is usb0

I don't know enough to diagnose this problem. Setting Firefox to ipv4 does not help.

Any help is appreciated.

Last edited by Sepero; 12-09-2008 at 07:54 AM.
 
Old 12-10-2008, 05:26 AM   #2
arnuld
Member
 
Registered: Dec 2005
Location: Punjab (INDIA)
Distribution: Arch
Posts: 211

Rep: Reputation: 30
you are using static or Dynamic DNS ? .. give some output like:

Quote:
ifconfig eth0
 
Old 12-10-2008, 08:35 AM   #3
Sepero
Member
 
Registered: Jul 2004
Location: Tampa, Florida, USA
Distribution: Ubuntu
Posts: 734

Original Poster
Blog Entries: 1

Rep: Reputation: 33
Static
Code:
a@EMONSTER:~$ ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 00:13:d3:07:89:3a  
          inet addr:192.168.0.197  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::213:d3ff:fe07:893a/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:342616 errors:0 dropped:0 overruns:0 frame:0
          TX packets:243377 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:419058432 (419.0 MB)  TX bytes:32535465 (32.5 MB)
          Interrupt:23 Base address:0xdd00
 
Old 12-11-2008, 03:01 AM   #4
arnuld
Member
 
Registered: Dec 2005
Location: Punjab (INDIA)
Distribution: Arch
Posts: 211

Rep: Reputation: 30
Quote:
Originally Posted by Sepero View Post
Static
Code:
a@EMONSTER:~$ ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 00:13:d3:07:89:3a  
          inet addr:192.168.0.197  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::213:d3ff:fe07:893a/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:342616 errors:0 dropped:0 overruns:0 frame:0
          TX packets:243377 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:419058432 (419.0 MB)  TX bytes:32535465 (32.5 MB)
          Interrupt:23 Base address:0xdd00
Just put 192.168.0.1 into firefox. If that does not work, I will be quite surprised. Just tell me what happens.

2nd, post the contents of /etc/resolv.conf .

3rd, try "ping 218.248.255.145" and then try "ping google.com" and tell me which one pings

3rd, I don't know how Ubuntu works. I don't like Ubuntu much, it's much complex without any logical reason. May be you will be helped on Ubuntu Forums or go to #ubuntu or ##linux on irc.freenode.org

Last edited by arnuld; 12-11-2008 at 03:07 AM. Reason: correction
 
Old 12-11-2008, 03:53 PM   #5
Sepero
Member
 
Registered: Jul 2004
Location: Tampa, Florida, USA
Distribution: Ubuntu
Posts: 734

Original Poster
Blog Entries: 1

Rep: Reputation: 33
First I restart both computers and let them fully boot.
Then I connect the cable.
Then I enter commands.
The guide says to use 192.168.0.*, but I use 192.168.1.*, because the pre-existing local area network already uses 192.168.0.*.


Commands I put into the gateway (Ubuntu Intrepid 8.10):
Code:
root@EMONSTER:~# ifconfig usb0 192.168.1.1
root@EMONSTER:~# iptables -A FORWARD -i eth0 -o usb0 -s 192.168.1.0/24 -m state --state NEW -j ACCEPT
root@EMONSTER:~# iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
root@EMONSTER:~# iptables -A POSTROUTING -t nat -j MASQUERADE
root@EMONSTER:~# echo 1 > /proc/sys/net/ipv4/ip_forward
Commands I put into the client (Debian Etch):
Code:
~# /etc/init.d/networking stop
Deconfiguring network interfaces...done.
~# ifconfig usbd0 192.168.1.100
~# route add default gw 192.168.1.1
~# /etc/init.d/networking restart
/etc/network/options is deprecated (see README.Debian of netbase).
Setting up IP spoofing protection...done (rp_filter).
Reconfiguring network interfaces...done.
Client /etc/resolve.conf:
Code:
# Domain name searches will fail until you point this to a real DNS server. 
nameserver 207.22.166.61
nameserver 207.22.166.2
nameserver 192.168.192.1
nameserver 192.168.0.1
nameserver 192.168.0.2
nameserver 192.168.1.1

prepend domain-name-servers 208.67.222.222,208.67.220.220;

When I put 192.168.0.1 (LAN) into firefox, I get the main routers login interface.
When I put 192.168.1.1 (Gateway) into firefox, I get "The connection was refused when attempting to contact 192.168.1.1".

Pinging 218.248.255.145 and google works just fine.

When I do "wget google.com" or "wget yahoo.com", it stops at:
"HTTP request sent, awaiting response... "


So that is pretty much where I'm stuck. I can ping, but I cannot download.




=====================================================================
=====================================================================




I don't know if this will help, but I have some code from about 2 years ago. I used to use this code to get this same Client connected.

The difference now is I'm using a different computer as a Gateway, and I'm not on dialup internet. Here is the code I used then-

Gateway:
Code:
MY_IP=`ifconfig ppp0 | grep "inet addr" | cut -d ":" -f 2 | cut -d " " -f 1`
if [ -z "$MY_IP" ]; then sleep 120; continue; fi
echo $MY_IP

ifconfig usb0 192.168.129.1 netmask 255.255.255.255 up #2> /dev/null
route add -host 192.168.129.201 usb0 #2> /dev/null
iptables -t nat -F
iptables -t nat -A POSTROUTING -j SNAT -o ppp0 --to "$MY_IP"
echo 1 > /proc/sys/net/ipv4/ip_forward
Client:
Code:
#!/bin/bash
# connect2host.sh - For connecting through USB to a host machine for net access

su -c "/sbin/route add -host 192.168.129.1 usbd0"
su -c "/sbin/route delete -net 192.168.129.0/24 usbd0"
su -c "/sbin/route add default gw 192.168.129.1"
When I tried replacing "eth0" for "ppp0", I ended up with the same results I have now. (Ping, but no download)
 
Old 12-11-2008, 10:51 PM   #6
arnuld
Member
 
Registered: Dec 2005
Location: Punjab (INDIA)
Distribution: Arch
Posts: 211

Rep: Reputation: 30
Quote:
The guide says to use 192.168.0.*, but I use 192.168.1.*, because the pre-existing local area network already uses 192.168.0.*.When I put 192.168.0.1 (LAN) into firefox, I get the main routers login interface.
I don't get it much. I simply have experience with a Router/Modem with one computer and with a LAN -> Hub -> Modem . I don't know much if your are using a computer as a gateway (instead of a Modem). Reminds of my friend's cyber-cafe where he was using one computer as gateway (running on Winodws XP). The problem was, when this computers shuts down, the whole network goes down with internet. So I modified his settings and made the Router as gateway and put that computer on LAN, along with 10 other computers connected to a Hub and the Hub was connected to modem. BENEFIT: now very compuer runs internet independently, the idea of using a computer as a gateway is always a bad to me, I can't help much if you insist on that.

Take it to ##linux or #ubuntu or to Ubuntu forums.
 
Old 12-12-2008, 12:57 AM   #7
Sepero
Member
 
Registered: Jul 2004
Location: Tampa, Florida, USA
Distribution: Ubuntu
Posts: 734

Original Poster
Blog Entries: 1

Rep: Reputation: 33
If I could put the computer on the LAN I would. Unfortunately, I can't because the Client computer is a Sharp Zaurus C860, and has no ethernet port. It only has a usb port for connecting to other computers.

Anyway, I appreciate you trying to help me. Hopefully someone can help me further.

Thank you
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Strange Ping Issue - Can't ping localhost but can ping others on LAN code_slinger Linux - Networking 15 03-30-2015 02:39 PM
slow download--insconsistent ping replies bhogalts Linux - Networking 5 04-06-2006 12:18 PM
Can ping but not download kevLind Linux - Networking 5 02-24-2006 05:21 PM
LAN/ADSL Router ping working but DNS ping fails R N Ghosh Linux - Networking 1 01-13-2006 07:44 AM
windows 98 m/c ping to ip address of red hat server but fails to ping hostname ravilohot Linux - Networking 2 09-07-2004 04:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration