Linux Box DHCP Disabled

Hello
Since I disabled dhcp in my linksys router and
Assigned an IP address to my box, I cannot access
To the shell remotely from my office using Putty!
In the router I have forwarding ports open,
The Firewalls are disabled in the box and in the router.
I don’t know What can it be this incident.
Thanks For Any Help!
XtryAsked:
Who is Participating?
 
GnsConnect With a Mentor Commented:
> NETWORK=6.6.6.6
is still wrong... With that netmask you should have
NETWORK=6.6.6.0
and nothing else.

"Subnetting" an A-class address like this is OK, as long as one is sure that the address in private... the aclass 6.0.0.0/8 address (in which your little subnet is part) is still owned by DoD and was one of the initial addresses in the DARPA net... Perhaps not the best choice;-). Now, the 10 A-class, 172.16-32 B-classes and 192.168.0-255 are guaranteed to be "private" networks (ie not allowed on the internet), so best use one of these. Easy thing is to change the first byte from 6 to 10.
'
Could you please answer my (more or less stated) questions as to what works and what don't?

-- Glenn
0
 
jgiordanoCommented:
using putty are you trying to telnet? or rlogin etc..

0
 
XtryAuthor Commented:
Yes.
0
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

 
jgiordanoCommented:
which one there is a difference - there is an option when configuring putty; also what is the port
0
 
pjedmondConnect With a Mentor Commented:
In order to communicate through the firewall, you must forward port 22 for ssh, or port 23 for telnet.

The port needs to be forwarded to the ip address of the box concerned. I suspect that as the DHCP daemon had only assigned 1 address, it only had one address to forward the connections to, and therefore worked automatically?? although that dowsn't sound like a particularly sucure option to me!

You find the ip address of your box using the command:

ifconfig

However, there is another twist here:) The DHCP probably also provides the gateway address to your ethernet card that you'll have to add manually.

Assuming a reasonably standard linux box check with the command:

route

that the gateway is corectly mentioned.

To manually configure this check:
/etc/sysconfig/network-scripts/ifcfg-eth0

My entry is:


--------8X------------------
BOOTPROTO=none
GATEWAY=192.168.0.1
DEVICE=eth0
MTU=""
NETMASK=255.255.255.128
BROADCAST=192.168.0.127
IPADDR=192.168.0.100
NETWORK=192.168.0.0
ONBOOT=yes

---------8X-----------------

or use the 'route add' command to temporarily add the route for testing.

If the route is not set, then the daemon receives the request as the router forwards it correctly, but the responses never get back...hence it won't work! This routing info is often provided automatically by the DHCP server.

HTH:)
0
 
XtryAuthor Commented:
This is what I have in My /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.1.100
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
NETWORK=192.168.1.1
BROADCAST=192.168.1.255
TYPE=Ethernet
MII_NOT_SUPPORTED=no
0
 
pjedmondCommented:
The line NETWORK should be changed to:

NETWORK=192.168.1.0  

and you'll need to restart the eth0 interface for it to take effect.

..and the results of the:

route

command should be something similar to:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.0     *               255.255.255.128 U     0      0        0 eth0
127.0.0.0       *               255.0.0.0       U     0      0        0 lo
default         192.168.0.1     0.0.0.0         UG    0      0        0 eth0

Where 192.168.0.1 is my gateway router.
From the linux box, can you ping the router - shouldn't be a problem, but can you ping anything beyond the router (yahoo com?)
0
 
GnsCommented:
Hm, I suspect you don't have a telnet server on your box... Rather likely you've got ssh though, so make doubly sure you forward the right port, and remember to check the corrrect protocol in putty.

-- Glenn
0
 
e-tsikCommented:
Hi :-)

From reading your questions, I gather that you *are* able to login from the local network.

Since you have changed your ip address recently. My guess would be that you have not set the default gateway correctly. The line you see in you ifcfg-eth0 has no effect. The real default gateway is set via the file
/etc/sysconfig/network
Look for the line saying
GATEWAY=
and set the ip address of the router there.

Restart networking afterwards:
service network restart

Enjoy!
0
 
XtryAuthor Commented:
nothing still the same
0
 
e-tsikConnect With a Mentor Commented:
Look at your
 /etc/sysconfig/network-scripts/ifcfg-eth0

You have
BOOTPROTO=static

It should have been
BOOTPROTO=dhcp

I think that this, plus the /etc/sysconfig/network should work.
0
 
GnsCommented:
No e-tsik, Xtry has recently just moved all his/her machines _from_ a DHCP setup _to_ a static setup... We're trying to get that setup to work equally well as the windoze and macs s/he already have working, and in this particular case see if we can help get remote ssh through the router/firewall (perhaps NATing device?)...

I suspect that on the local LAN the machine works splendidly(?), and possibly also accessing the internet(?)...

Xtry, if you have "local" network problems, could we have (once again) the contents of /etc/sysconfig/network and /etc/sysconfig/network-scripts/ifcfg-eth0, just to see the current state of those files? And the output from
ifconfig eth0
as well?

If local access is OK, but not internet, you'd need look at any routing and/or firewalling issues (on the linux boix as well as the router). This is why we'd like to look at the output from
route
.... again, just to make sure.

If no "local" problems (ie you are able to ssh from another local machine to the linux box) this is in all likelyhood a problem with the port forwarding in the linksys device.

-- Glenn
0
 
XtryAuthor Commented:
ok here is what I have, I have decided to change the IP of my Router to 6.6.6.6 instead of 192.168.1.1

in file /etc/sysconfig/network I have this
-----------------------------
ETWORKING=yes
HOSTNAME=localhost.localdomain
GATEWAY=6.6.6.6
-----------------------------
in file /etc/sysconfig/network-scripts/ifcfg-eth0  I have this
-----------------------------
OOTPROTO=static
GATEWAY=6.6.6.6
DEVICE=eth0
NETMASK=255.255.255.0
BROADCAST=6.6.6.255
IPADDR=6.6.6.100
NETWORK=6.6.6.6
ONBOOT=yes
-----------------------------
the output of ifconfig eth0
-----------------------------
eth0      Link encap:Ethernet  HWaddr 00:04:5A:80:7C:51
          inet addr:6.6.6.100  Bcast:6.6.6.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:121320 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2886 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:7641821 (7.2 Mb)  TX bytes:1253246 (1.1 Mb)
          Interrupt:11 Base address:0x2000
-----------------------------
0
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.

All Courses

From novice to tech pro — start learning today.