Connecting Linux static IP to linksys router

have a machine formerly used on a corp lan via a linux firewall. I want to use it at home via my linksys box. I can't seem to get this box to connect to the internet via the linksys device.

The machine can ping the linksys box (192.168.1.1) and the other XP box (192.168.1.100 via DHCP) on the lan. The linux box has a static ip (192.168.1.102).

I have set the /etc/sysconfig/network gateway to 192.168.1.1

what else needs to be set?
ethereal11Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

owensleftfootCommented:
You need to add dns servers in /etc/resolv.conf  -
nameserver ip-of-isps-dns-server1
nameserver ip-of-isps-dns-server2
0
ethereal11Author Commented:
I set that to 192.168.1.1 - the linksys ip.. not good enough?

there is some connection problem somewhere as I can't ping a known net ip address either.
EG I can ping 'cnn.com' from my xp box but not from the linux box.
0
wesly_chenCommented:
Hi,

   Do "ipconfig /all" from your XP machine and write down the DNS servers.
Edit /etc/resolv.conf put the DNS servers' IPs in it. 192.168.1.1 is not a DNS server.

Edit /etc/nsswitch.conf and modify the line:
----
hosts:  files dns      <== make sure you have "dns"
----

> set the /etc/sysconfig/network gateway to 192.168.1.1
You need to reboot to take effect.
Or login as root and run
route add default gw 192.168.1.1   <=== add default gateway manually
and
netstat -rn    <=== check the routing table

Wesly
0
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

ethereal11Author Commented:
ok:

1) added 2 'nameserver' entries to /etc/resolv.conf based on output from the XP machine
2) checked /etc/nsswitch - made sure that 'dns' and 'files' were in the 'hosts' line
3) set /etc/sysconfig/network 'gateway' to 192.168.1.1
4) when I typed 'route add default gw 192.168.1.1' I get SIOCADDRT: File exists
- because -
5) 'netstat -rn' shows that 192.168.1.1 is already the default gateway.
Its the 3rd line:
0.0.0.0           192.168.1.1          0.0.0.0        UG   0  0           0 eth0

I tried 'dig yahoo.com' and got 'timed out: no servers could be reached'.

Attempts to ping outside of the local lan don't work. Pings within the LAN do work as does pinging the linksys box.

Thoughts?
0
wesly_chenCommented:
Could you provide the output of
"ipconfig /all" from XP box
"netstat -rn" "cat /etc/hosts" and "cat /etc/resolv.conf" from Linux box?

Wesly
0
ethereal11Author Commented:
C:\Documents and Settings\default>ipconfig /all

Windows IP Configuration

        Host Name . . . . . . . . . . . . : bad-kitty4
        Primary Dns Suffix  . . . . . . . :
        Node Type . . . . . . . . . . . . : Unknown
        IP Routing Enabled. . . . . . . . : No
        WINS Proxy Enabled. . . . . . . . : No
        DNS Suffix Search List. . . . . . : comcast.net

Ethernet adapter Local Area Connection:

        Connection-specific DNS Suffix  . : comcast.net
        Description . . . . . . . . . . . : 3Com 3C920 Integrated Fast Ethernet
Controller (3C905C-TX Compatible)
        Physical Address. . . . . . . . . : 00-B0-D0-F8-5B-AD
        Dhcp Enabled. . . . . . . . . . . : Yes
        Autoconfiguration Enabled . . . . : Yes
        IP Address. . . . . . . . . . . . : 192.168.1.100
        Subnet Mask . . . . . . . . . . . : 255.255.255.0
        Default Gateway . . . . . . . . . : 192.168.1.1
        DHCP Server . . . . . . . . . . . : 192.168.1.1
        DNS Servers . . . . . . . . . . . : 24.0.48.33
                                            24.0.48.34
                                            204.127.198.4
        Lease Obtained. . . . . . . . . . : Monday, November 29, 2004 6:47:15 AM

        Lease Expires . . . . . . . . . . : Wednesday, December 01, 2004 6:47:15
 AM

[root (bad-kitty8)  /etc]# netstat -rn
Kernel IP routing table

Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
192.168.1.0     0.0.0.0         255.255.255.0   U         0 0          0 eth0
127.0.0.0       0.0.0.0         255.0.0.0       U         0 0          0 lo
0.0.0.0         192.168.1.1     0.0.0.0         UG        0 0          0 eth0

[root (bad-kitty8)  /etc]# cat /etc/hosts
127.0.0.1               localhost
192.168.1.102           bad-kitty8
[root (bad-kitty8)  /etc]# cat /etc/resolv.conf
nameserver 24.0.48.33
nameserver 24.0.48.34

0
wesly_chenCommented:
So can you "ping 24.0.48.33"?
Do you have any firewall setting on your Linux box?
Do "iptables -L" and post the result here?
Which Linux you have? RedHat/Fedora or SuSE?

Wesly
0
ethereal11Author Commented:
I can ping 24.0.48.33. I tried this earlier with an address from CNN.com and got nothing. V cool. That means that packets are moving back and forth. Now its just a DNS issue.

I still can't 'dig yahoo.com'.

No firewall settings on this box.

[root (bad-kitty8)  /etc]# iptables -L
bash: iptables: command not found

0
wesly_chenCommented:
For DNS client, there are 2 files involved.
/etc/resolv.conf
/etc/nsswitch.conf

Could you provide
1. post the /etc/nsswitch.conf
2. nslookup www.yahoo.com
3. Which Linux

> [root (bad-kitty8)  /etc]# iptables -L
> bash: iptables: command not found
That means you can find the iptables commands (/sbin/iptables).

Wesly
0
ethereal11Author Commented:
passwd:     files nisplus nis
shadow:     files nisplus nis
group:      files nisplus nis

#hosts:     db files nisplus nis dns
hosts:      files nisplus nis dns

bootparams: nisplus [NOTFOUND=return] files

ethers:     files
netmasks:   files
networks:   files
protocols:  files
rpc:        files
services:   files

netgroup:   nisplus

publickey:  nisplus

automount:  files nisplus
aliases:    files nisplus



[root (bad-kitty8)  /etc]# nslookup yahoo.com
;; connection timed out; no servers could be reached


No 'iptables' under /sbin.

Im running Mandrake v9.1.


0
ethereal11Author Commented:
BTW: I upped the points to 250. Thanks for sticking with me here.
0
wesly_chenCommented:
> hosts:      files nisplus nis dns
Do you have NIS+ or NIS server in you rnetwork?
Could you change to
----
hosts:   files dns nis nisplus
---
And try dig or nslookup.

Wesly
0
ethereal11Author Commented:
I changed the line to

hosts: files dns

tried 'dig yahoo.com' - unsuccesful.
0
wesly_chenCommented:
Please do
grep 53 /etc/services
and post result. Make sure you have (add them if not)
---
domain          53/tcp
domain          53/udp
---

Besides, please do
nslookup (enter)
> server 24.0.48.33 (enter)
www.yahoo.com
> exit

Wesly
0
ethereal11Author Commented:
[root (bad-kitty8)  /home/jony]# cd /etc
[root (bad-kitty8)  /etc]# grep 53 /etc/services
# The Dynamic and/or Private Ports are those from 49152 through 65535
domain          53/tcp                          # name-domain server
domain          53/udp
gdomap          538/tcp                         # GNUstep distributed objects
gdomap          538/udp                         # GNUstep distributed objects
iiop            535/tcp
iiop            535/udp
courier         530/tcp         rpc
conference      531/tcp         chat
netnews         532/tcp
netwall         533/udp                         # -for emergency broadcasts
cfengine        5308/tcp                        # CFengine
cfengine        5308/udp                        # CFengine
knetd           2053/tcp                        # Kerberos de-multiplexor
rndc            953/tcp                         # rndc control sockets (BIND 9)
rndc            953/udp                         # rndc control sockets (BIND 9)
noclog          5354/tcp                        # noclogd with TCP (nocol)
noclog          5354/udp                        # noclogd with UDP (nocol)
hostmon         5355/tcp                        # hostmon uses TCP (nocol)
hostmon         5355/udp                        # hostmon uses TCP (nocol)
[root (bad-kitty8)  /etc]# nslookup
Note:  nslookup is deprecated and may be removed from future releases.
Consider using the `dig' or `host' programs instead.  Run nslookup with
the `-sil[ent]' option to prevent this message from appearing.
> server 24.0.48.33
Default server: 24.0.48.33
Address: 24.0.48.33#53
www.yahoo.com
;; connection timed out; no servers could be reached
>


***********
FWIW: this system was part of a small office network recently. It worked fine when running through a linux firewall and DNS server(on different machines).
0
wesly_chenCommented:
> Address: 24.0.48.33#53
www.yahoo.com
> ;; connection timed out; no servers could be reached
You can ping 24.0.48.33 but you can not querry DNS from 24.0.48.33 through UDP port 53.
So it sounds to me is firewall issue (block UDP 53).
You might want to check your system/network setting for firewall (since it's not use iptables).
The following is a reference:
http://doc.mandrakelinux.com/MandrakeLinux/91/en/Starter.html/tinyfirewall.html

Wesly
0
ethereal11Author Commented:
Doesn't seem like it could be a firewall issue. There isn't one running on this machine. It used to work fine when routing to the net via a separate box.
0
wesly_chenCommented:
Could you please provide the following results:
ifconfig -a
ping 216.109.117.207    (one of IP for www.yahoo.com)
traceroute 24.0.48.33

Wesly
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ethereal11Author Commented:
Problem solved. I added more DNS entries from my cable provider. I think the ones listed in the modem aren't answering... so this is a problem on the other end!

Bleah.

You get the points for sticking with this.

Thanks for your perseverance!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Networking

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.