LinuxQuestions.org
Help answer threads with 0 replies.
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 08-28-2004, 10:59 AM   #1
tentolga
LQ Newbie
 
Registered: Aug 2004
Posts: 22

Rep: Reputation: 15
Angry I've got an IP but can't get internet to work!


My linux box is able to get an IP from DCHP server but I'm not able to connect the internet. What would be the problem?
 
Old 08-28-2004, 11:08 AM   #2
nvargas
Member
 
Registered: Jan 2002
Location: Managua, Nicaragua
Distribution: Mandriva, SuSE, Ubuntu
Posts: 46

Rep: Reputation: 15
Please run ifconfig as root and paste the output here.
 
Old 08-28-2004, 11:29 AM   #3
tentolga
LQ Newbie
 
Registered: Aug 2004
Posts: 22

Original Poster
Rep: Reputation: 15
ok, here it is...

Code:
eth0      Link encap:Ethernet  HWaddr 00:0B:06:2C:8E:D1
          inet addr:194.54.xxx.xxx  Bcast:194.54.xxx.255  Mask:255.255.252.0
          inet6 addr: fe80::20b:6ff:fe2c:8ed1/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:880 errors:0 dropped:0 overruns:0 frame:0
          TX packets:30 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:42132 (41.1 Kb)  TX bytes:2841 (2.7 Kb)

eth1      Link encap:Ethernet  HWaddr 00:DD:10:00:8C:1C
          inet addr:192.168.0.1  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::2dd:10ff:fe00:8c1c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:103 errors:0 dropped:0 overruns:0 frame:0
          TX packets:99 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:10018 (9.7 Kb)  TX bytes:12189 (11.9 Kb)
          Interrupt:9 Base address:0xd800

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:1899 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1899 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:2041632 (1.9 Mb)  TX bytes:2041632 (1.9 Mb)
 
Old 08-28-2004, 11:50 AM   #4
tentolga
LQ Newbie
 
Registered: Aug 2004
Posts: 22

Original Poster
Rep: Reputation: 15
Help please... It's really important for me...any idea? what would be the problem?
 
Old 08-28-2004, 12:33 PM   #5
tentolga
LQ Newbie
 
Registered: Aug 2004
Posts: 22

Original Poster
Rep: Reputation: 15
anybody there?

I'm sitting here and waiting for an answer...going crazy..All I need a little help.
 
Old 08-28-2004, 12:58 PM   #6
cruddybuddy
LQ Newbie
 
Registered: Aug 2004
Posts: 5

Rep: Reputation: 0
Don't count on it. I waited for days to get an answer to my question and still nothing. Just stick with Windows and you'll be fine.
 
Old 08-28-2004, 04:11 PM   #7
Netizen
Member
 
Registered: Sep 2003
Location: Texas
Distribution: Slackware and Ubuntu
Posts: 355

Rep: Reputation: 30
Quote:
Originally posted by cruddybuddy
Don't count on it. I waited for days to get an answer to my question and still nothing. Just stick with Windows and you'll be fine.
Did you try to find help on your own or did you give up because no one would do it for you?


tentolga:

Is this your main PC or is this a router? Why do you have 2 nics?

Netizen
 
Old 08-28-2004, 04:13 PM   #8
Poetics
Senior Member
 
Registered: Jun 2003
Location: California
Distribution: Slackware
Posts: 1,181

Rep: Reputation: 49
And on eth0 your subnet is 255.255.252.0 --- is this what you set it up to use?
 
Old 08-28-2004, 05:30 PM   #9
cruddybuddy
LQ Newbie
 
Registered: Aug 2004
Posts: 5

Rep: Reputation: 0
Quote:
Originally posted by Netizen
Did you try to find help on your own or did you give up because no one would do it for you?
Netizen
Nope, I've been trying for hours on end, everyday since I first posted my question. Someone did finally post a reply for me. *squeak squeak*
 
Old 08-28-2004, 06:09 PM   #10
arno
Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: fedora core 8, suse 10.3, ubuntu 7.10, kamikaze 7.09
Posts: 515

Rep: Reputation: 30
can you
a)
ping -c 3 66.102.9.104
b)
ping -c 3 www.google.com

if a= no
Post the content of
route -n

then
if b=no
Post the content of
cat /etc/resolve.conf
 
Old 08-29-2004, 01:22 AM   #11
tentolga
LQ Newbie
 
Registered: Aug 2004
Posts: 22

Original Poster
Rep: Reputation: 15
This is the firewall script which I created via a script generator. One of linux fellows from here helped me in order to add required lines.

Code:
#!/bin/sh

#iptables script generator: V0.1-2002
# Comes with no warranty!
# e-mail: michael@1go.dk

# Diable forwarding
echo 0 > /proc/sys/net/ipv4/ip_forward

LAN_IP_NET='192.168.0.0/24'
LAN_NIC='eth1'
WAN_IP='194.54.xxx.xxx'
WAN_NIC='eth0'

# load some modules (if needed)
modprobe ip_conntrack_ftp ## passive ftp modules
modprobe ip_nat_ftp

# Flush
iptables -t nat -F POSTROUTING
iptables -t nat -F PREROUTING
iptables -t nat -F OUTPUT
iptables -F

iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT ACCEPT

# enable Masquerade and forwarding
iptables -t nat -A POSTROUTING -s $LAN_IP_NET -j MASQUERADE
iptables -A FORWARD -j ACCEPT -i $LAN_NIC -s $LAN_IP_NET
iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT

# STATE RELATED for router
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
##
iptables -A INPUT -s $LAN_IP_NET -j ACCEPT

##
iptables -A INPUT -s 127.0.0.1 -j ACCEPT
iptables -A INPUT -d 127.0.0.1 -j ACCEPT

# Enable forwarding
echo 1 > /proc/sys/net/ipv4/ip_forward
And this is the output of ping -c 3 www.google.com

Code:
PING 216.239.59.99 (216.239.59.99) 56(84) bytes of data.
From 194.54.xxx.xxx icmp_seq=0 Destination Host Unreachable
From 194.54.xxx.xxx icmp_seq=1 Destination Host Unreachable
From 194.54.xxx.xxx icmp_seq=2 Destination Host Unreachable
This my resolv.conf file.

Code:
; generated by /sbin/dhclient-script
nameserver 212.175.13.34
nameserver 212.175.13.35
nameserver 212.156.4.10
and the last one kernel IP routing table

Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth1
194.54.32.0     0.0.0.0         255.255.252.0   U     0      0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 eth1
0.0.0.0         194.54.32.1     0.0.0.0         UG    0      0        0 eth0
When I was trying to get these outputs something strange happened.
I don't know why but suddenly I was able to open google..but it was very slow...very very slow..then I lost the connection again, actually not connection just web...

If there is anything else that you would like to see, let me know...
 
Old 08-29-2004, 10:22 AM   #12
arno
Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: fedora core 8, suse 10.3, ubuntu 7.10, kamikaze 7.09
Posts: 515

Rep: Reputation: 30
Your network configuration is OK, there are no errors on your eth0, I lack the experience to give an opinion in reference to iptables.

Could you get hold of a live cd like knoppix so you could exclude the firewall settings.

What are you using to get an Internet connection ?
I read you called it an dhcp server !
 
Old 08-30-2004, 01:28 AM   #13
tentolga
LQ Newbie
 
Registered: Aug 2004
Posts: 22

Original Poster
Rep: Reputation: 15
I'm using FC2 and have a cable modem which is connectted via USB to my computer. There is a program called dhclient, the linux box is using this program to get an IP from DHCP server. When I looked into the logs I saw an error like;

dhclient :sit0 :unknown hardware address type 776

I think all this stuff messed up my cable modem (Motorola SB4200) . I don't know why but I'm waiting too long to get the modem to be online. I mean it takes too much time to see the orange activity light blinking. I tried to monitor what was going on the network and got some results. All the packages around the network were ARP packages. Before all this stuff my cable modem could be easily get online. Is it possible that linux caused my modem not to be online?

I need help, really tired of all this stuff... Please just give a little help to this newbie...
 
Old 08-30-2004, 02:47 AM   #14
tentolga
LQ Newbie
 
Registered: Aug 2004
Posts: 22

Original Poster
Rep: Reputation: 15
Bump!
 
Old 08-30-2004, 05:04 PM   #15
arno
Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: fedora core 8, suse 10.3, ubuntu 7.10, kamikaze 7.09
Posts: 515

Rep: Reputation: 30
You could do two things
1)
Could you ask your provider to check if they gave someone else on their net the same ip address they programmed in your adsl modem
2)
this modem also has an network interface us it to test the connection to the internet ( it should have got a different ip address then the usb port )
 
  


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
internet doesn't work well furiousV Linux - Newbie 36 08-02-2005 05:49 PM
Getting my internet to work...? linux_dejan Linux - Networking 3 03-05-2004 01:48 PM
why won't the internet work? jimthing2001 Linux - Newbie 5 01-06-2004 05:40 PM
internet does not work gorek Linux - Networking 1 12-11-2003 09:30 AM
Internet won't work Muze Linux - General 4 09-25-2003 09:15 AM

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

All times are GMT -5. The time now is 03:10 PM.

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