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 ( and the other XP box ( via DHCP) on the lan. The linux box has a static ip (

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

what else needs to be set?
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.

You need to add dns servers in /etc/resolv.conf  -
nameserver ip-of-isps-dns-server1
nameserver ip-of-isps-dns-server2
ethereal11Author Commented:
I set that to - 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 '' from my xp box but not from the linux box.

   Do "ipconfig /all" from your XP machine and write down the DNS servers.
Edit /etc/resolv.conf put the DNS servers' IPs in it. 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
You need to reboot to take effect.
Or login as root and run
route add default gw   <=== add default gateway manually
netstat -rn    <=== check the routing table

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:

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
4) when I typed 'route add default gw' I get SIOCADDRT: File exists
- because -
5) 'netstat -rn' shows that is already the default gateway.
Its the 3rd line:         UG   0  0           0 eth0

I tried 'dig' 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.

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

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. . . . . . :

Ethernet adapter Local Area Connection:

        Connection-specific DNS Suffix  . :
        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. . . . . . . . . . . . :
        Subnet Mask . . . . . . . . . . . :
        Default Gateway . . . . . . . . . :
        DHCP Server . . . . . . . . . . . :
        DNS Servers . . . . . . . . . . . :
        Lease Obtained. . . . . . . . . . : Monday, November 29, 2004 6:47:15 AM

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

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

Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface   U         0 0          0 eth0       U         0 0          0 lo         UG        0 0          0 eth0

[root (bad-kitty8)  /etc]# cat /etc/hosts               localhost           bad-kitty8
[root (bad-kitty8)  /etc]# cat /etc/resolv.conf

So can you "ping"?
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?

ethereal11Author Commented:
I can ping I tried this earlier with an address from 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'.

No firewall settings on this box.

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

For DNS client, there are 2 files involved.

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

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

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
;; connection timed out; no servers could be reached

No 'iptables' under /sbin.

Im running Mandrake v9.1.

ethereal11Author Commented:
BTW: I upped the points to 250. Thanks for sticking with me here.
> 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.

ethereal11Author Commented:
I changed the line to

hosts: files dns

tried 'dig' - unsuccesful.
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 (enter)
> exit

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
Default server:
;; 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).
> Address:
> ;; connection timed out; no servers could be reached
You can ping but you can not querry DNS from 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:

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.
Could you please provide the following results:
ifconfig -a
ping    (one of IP for


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!


You get the points for sticking with this.

Thanks for your perseverance!
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.