LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-19-2010, 02:39 AM   #16
aarav2306
Member
 
Registered: Jan 2009
Posts: 55

Original Poster
Rep: Reputation: 15

hi
ifconfig -a gives
Quote:
eth0 Link encap:Ethernet HWaddr 00:e0:5a:4d:11:2d
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:21 Base address:0xb800

eth1 Link encap:Ethernet HWaddr 00:11:11:23:99:5c
inet addr:192.168.1.21 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::211:11ff:fe23:995c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:895 errors:0 dropped:0 overruns:0 frame:0
TX packets:938 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:812667 (812.6 KB) TX bytes:159964 (159.9 KB)

eth0:avahi Link encap:Ethernet HWaddr 00:e0:5a:4d:11:2d
inet addr:169.254.3.161 Bcast:169.254.255.255 Mask:255.255.0.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
Interrupt:21 Base address:0xb800

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:100 errors:0 dropped:0 overruns:0 frame:0
TX packets:100 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:7968 (7.9 KB) TX bytes:7968 (7.9 KB)

pan0 Link encap:Ethernet HWaddr aa:58:c7:34:fa:c8
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
cat /etc/resolv.conf
Quote:
# Generated by NetworkManager
nameserver 203.94.243.70
nameserver 59.179.243.70
sudo iptables -L
Quote:
Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
sudo iptables -t nat -L
Quote:
Chain PREROUTING (policy ACCEPT)
target prot opt source destination

Chain POSTROUTING (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
route -n
Quote:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 1 0 0 eth1
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 eth1
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth1
0.0.0.0 0.0.0.0 0.0.0.0 U 1000 0 0 eth0
Don't know where it picked 169.254.0.0 from or eth0 when we have keyed 192.168.0.2 manually

netstat -r
Quote:
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.1.0 * 255.255.255.0 U 0 0 0 eth1
link-local * 255.255.0.0 U 0 0 0 eth0
link-local * 255.255.0.0 U 0 0 0 eth1
default 192.168.1.1 0.0.0.0 UG 0 0 0 eth1
default * 0.0.0.0 U 0 0 0 eth0

regards
Aarav
 
Old 07-19-2010, 04:14 AM   #17
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
Now, your eth1 is 192.168.1.xx and it should be external as per your say. But eth0, your internal interface does NOT have the ip address. You need to assign the ip address it to for your squid to work.
 
Old 07-19-2010, 08:10 AM   #18
aarav2306
Member
 
Registered: Jan 2009
Posts: 55

Original Poster
Rep: Reputation: 15
hi
I had manually keyed in the IP details of the internal interface eth0 using "Network Connections" tool. Anyways after using
sudo ifconfig eth0 192.168.0.2
I get the following details for "ifconfig -a" for eth0
eth0 Link encap:Ethernet HWaddr 00:e0:5a:4d:11:2d
inet addr:192.168.0.2 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::2e0:5aff:fe4d:112d/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1099171720 errors:217121317 dropped:97166996 overruns:54739840 frame:0
TX packets:51011 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1191619816 (1.1 GB) TX bytes:3148608 (3.1 MB)
Interrupt:21 Base address:0xb800
And after this when I run the NAT commands, my LAN is still not able to access internet.

eth0 is still not shown under "Active Connections" in "Connection Information".

regards
Aarav
 
Old 07-20-2010, 12:02 AM   #19
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
That would not make the IP address persistent after reboot.

[Edit]
Forgot your system was Ubuntu
[/Edit]

You need to edit the network connections and add the IP address there. If its Ubuntu desktop and not the server edition, you can do that from network manager icon displayed in the system tray.

Last edited by linuxlover.chaitanya; 07-20-2010 at 12:04 AM.
 
Old 07-20-2010, 01:01 AM   #20
aarav2306
Member
 
Registered: Jan 2009
Posts: 55

Original Poster
Rep: Reputation: 15
hi
Thats exactly how I added,wonder why it disappears
can someone help with my internet settings please for my LAN to access
regards
Aarav
 
Old 07-20-2010, 01:54 AM   #21
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
Unless your internal interface has a correct IP address and your network systems can connect to it, how do you expect to have internet inside the LAN? Your main problem seems to be that and not squid or iptables.
 
Old 07-21-2010, 12:24 AM   #22
aarav2306
Member
 
Registered: Jan 2009
Posts: 55

Original Poster
Rep: Reputation: 15
Hi
I have even changed my LAN card, why cant I find eth0 under "Active Connections" in "Connection Information".

ifconfig -a gives
eth0 Link encap:Ethernet HWaddr 00:e0:5a:4d:11:2d
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:21 Base address:0xb800

only after sudo ifconfig eth0 192.168.0.2 do I get
eth0 Link encap:Ethernet HWaddr 00:e0:5a:4d:11:2d
inet addr:192.168.0.2 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:21 Base address:0xb800

But still doesnt show eth0 under "Active Connections" in "Connection Information". Is that the reason for internet not reaching my LAN
regards
Aarav
 
Old 07-21-2010, 12:49 AM   #23
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
Thats your problem. You are not doing it properly then. There has to be some issue. Else try and do it manually by editing the files.
 
Old 07-21-2010, 06:35 AM   #24
Filip_Kv
LQ Newbie
 
Registered: Mar 2010
Location: Thessaloniki, Greece
Distribution: Debian, Ubuntu, CentOS, Fedora
Posts: 11

Rep: Reputation: 2
You cannot find it because it cannot locate drivers for it. You will have to locate non-free drivers for your new LAN card
probably. In /etc/apt/sources.list add non-free at the end of your deb lines, in order to check to these repositories as well.
 
Old 07-22-2010, 07:29 AM   #25
aarav2306
Member
 
Registered: Jan 2009
Posts: 55

Original Poster
Rep: Reputation: 15
hi
I got a networking consultant who claimed knowledge on Linux to help me out. His knowledge is worse than mine. He put his hands up and has asked me to change to Windows which I dont want to. I would rather revert to my previous ISP as things were running very smoothly till then.
Now I am not even able to add the IP to eth0 using
Quote:
ifconfig eth0 192.168.0.2
SIOCSIFADDR: Permission denied
SIOCSIFFLAGS: Permission denied
Also earlier when I directly connected my laptop to the internet, I wouldnt get the connection. He says the IP isnt what we see on eth1 of 192.168.1.2 in connection information or when we do ipconfig -a but it is 120.61.21.212 which he got after typing 192.168.1.1 in the browser, he says the external modem of MTNL has been assigned this IP. Being a rookie, I am totally confused. Pls help.

I am tempted to drop all this and go in for my old ISP.

regards
Aarav
 
Old 07-22-2010, 07:37 AM   #26
aarav2306
Member
 
Registered: Jan 2009
Posts: 55

Original Poster
Rep: Reputation: 15
hi
But when I did ipconfig after directly connectin my Windows Vista laptop I got the IP address of 192.168.1.3 and now when I put it on my Ubuntu desktop m/c I get 192.168.1.2
Dont find the 120.61.21.212 anywhere
regards
Aarav
 
Old 07-22-2010, 08:20 AM   #27
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
What ISP are you using? Do you use broadband modem? How is the ISP line terminated at your end? Please try to give as much information as possible. Even if no one has asked please tell whatever you know, and if possible even if you do not know.
 
Old 07-22-2010, 09:36 AM   #28
aarav2306
Member
 
Registered: Jan 2009
Posts: 55

Original Poster
Rep: Reputation: 15
hi
I used to use Hathaway broadband 256KPbs, switched to MTNL 1MBps recently as I was getting 1MBps speed for my earlier 256KBps. The MTNL line comes to the MTNL modem and from there to eth1 on the main PC which has Ubuntu desktop. From eth0 on this main PC, it goes to a switch which in turn is connected to 6other PCs.
When I connect another PC from the LAN besides the main PC directly onto the MNTL modem and manually assign it an IP of 192.168.1.113, am able to get internet connection for that PC as well. The MTNL modem has 4 slots, but somehow slots 1 & 4 only seem to work when connected. When I directly connect the LAN switch to the MTNL modem, it doesnt work. Also when the 2 PCs are directly connected to the MTNL modem, the speed is quite slow.
regards
Aarav
 
Old 07-23-2010, 12:08 AM   #29
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
So this seems to be the broadband connection. Make sure that the PC is connected to the working ethernet port and can ping the modem. The live is assigned to the modem, so you do not have to take care of that. And the modem has an internal ip address that you can assign. Assign the same range to the external card to the Ubuntu. Assign the internal card of Ubuntu some other range and assign the same address range to your systems in the network and masquerade the outgoing connections on the external card. This should be done. If anyone of this fails, you are sure network machines do not get the internet.
 
Old 07-23-2010, 02:51 AM   #30
aarav2306
Member
 
Registered: Jan 2009
Posts: 55

Original Poster
Rep: Reputation: 15
Hi
Since I am able to get internet on 1PC on the LAN by directly plugging it into the MTNL modem, let me see if I can make that as the hub by installing an additional LAN card on it, do I have to install squid as well or will NAT commands simply work
regards
Aarav
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
ppp dials up ISP but I can not access internet Jbone2007 Linux - Networking 2 01-08-2008 05:53 PM
can't access internet, but lan is ok jcor Linux - Networking 2 11-09-2007 10:55 AM
Access to the Internet without an ISP Gins Linux - Wireless Networking 4 04-26-2007 01:59 AM
Internet Access with RedHat9 and ISP is AOL sgarci Linux - Networking 6 08-14-2006 06:02 AM
Cannot connect to internet through ISP LAN in Fedora Core 2 tlee7977 Linux - Newbie 2 06-26-2004 12:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:54 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration