Link to home
Start Free TrialLog in
Avatar of Sam Lee
Sam Lee

asked on

Enable telnet on solaris ?

Hi Experts,

I have searched over the Expert Exchange but didn’t found a proper solution for this.
Please advice !

Thanks !
Avatar of Nisus091197
Nisus091197

Hi,

telnet is enabled by default.

Have a look in the /etc/inetd.conf file.  If the line is commented out then remove the '#' character.

Ensure that inetd is running by running this command:

ps -ef | grep inetd

inetd may be restarted by running this command as root:

/etc/init.d/inetd start

Hope this helps,

Regards, Nisus
http://www.omnimodo.com
just edit this line in /etc/inetd.conf file

it must be available by default just uncomment it




telnet      stream      tcp6      nowait      root      /usr/sbin/in.telnetd      in.telnetd



then restart the inet daemon


/etc/init.d/inetd start
Avatar of Sam Lee

ASKER


root@hostname# ps -ef | grep inetd
    root   157     1  0 16:07:19 ?        0:00 /usr/sbin/inetd -s
    root   386   353  0 17:52:08 console  0:00 grep inetd
root@hostname#

root@hostname# /etc/init.d/inetd stop
bash: /etc/init.d/inetd: No such file or directory
root@hostname#

/etc/inetd.conf file is okey ! but I can't telnet !
Hi,

log onto the server from the console and check that the service is running:

netstat -a | grep telnet

Check network settings:

netstat -nr

ifconfig -a

Check telnet itself on server:

telnet localhost

If all that seems okay, you may have a firewall issue.  Is sunscreen running?  Can you ping the server from another machine?

Please send in the error from telnet and the output from the commands above if this is still an issue.

Regards, Nisus
There is no file called /etc/init.d/inetd

inetd ist started through the startscript /etc/init.d/inetsvc

However you can stop inetd using

pkill inetd

and restart it using

/usr/sbin/inetd -s


Question: What exactly to you mean if you say you cannot telnet:

- If you try to telnet you get a connection refused (then start inetd as described above)

or

- if you try to telnet it prompts you for a loginname (you enter root) then for a password (you enter the password) and then it gives you a message "not on system console" ? (in this case, comment out the line that starts with CONSOLE= in the file /etc/default/login, no need to stop/start inetd)

or something completly different ?

Avatar of Hanno P.S.
Try
   telnet localhost
and/or
  telnet `uname -n`

What do you get here?
Yes, please provide more information...  some good questions have already been asked which should help you solve this problem.

One question I have is whether you get:

$ telnet server_xyz
server_xyz: Host name lookup failure

In which case the server you are trying to telnet to is not in the /etc/hosts file.

Avatar of Sam Lee

ASKER

telnet service is running.
I can telnet to the localhost
and inetd restarted.

But when I'm trying to telnet

C:\>telnet 192.x.x.x
Connecting To 192.x.x.x...Could not open connection to the host, on port 23:
 Connect failed

C:\>
can you ping 192.x.x.x

do this on your PC:

tracert 192.x.x.x

netstat -nr

looks like a networking thing.

Regards, Nisus
Avatar of Sam Lee

ASKER


send me a command add a IP to a interface please !
ifconfig <interface> addif <newip>
Avatar of Sam Lee

ASKER

The sun server was a deferent IP range but now I have add secondary IP for the interface, but it still I’m having the same problem I can ping but can’t telnet.
>> telnet service is running.
>> I can telnet to the localhost
>> and inetd restarted.

Have you doe this on the server you try to reach or on the client ?
Avatar of Sam Lee

ASKER

in the server I can't ping to the client ! but the client can't ping to the server.
>> in the server I can't ping to the client ! but the client can't ping to the server.

erm... say again.. there must be a typo up in that sentence. who CAN ping whom and who CANT ping whom?
Avatar of Sam Lee

ASKER

Sun server CANT ping to the client.
But the client CAN ping to the server.
ok, I suppose the client is some xp-machine with xp-firewall active,  so this would be ok (tell me if I'm wrong).

Try the following:

On the server:

snoop port telnet

Then on the client:

try to telnet, so that you are getting an error message

Post the output of the above snoop command.

also on the server:

netstat -an | grep 23

and post the output here.

Avatar of Sam Lee

ASKER

root@hostname# snoop port telnet
Using device /dev/bge0 (promiscuous mode)

root@hostname# netstat -an | grep 23
      *.32823                               Idle
      *.23                 *.*                0      0 49152      0 LISTEN
      *.23                              *.*                             0      0
49152      0 LISTEN
root@hostname#
ok, so your server is really listening to telnet. And as snoop did not output any data it seems that you are not getting to the correct machine or that some firewall on the client side or in between is preventing access.

So few more questions:

Is your sun-server and your client in the same network?
When you did that ifconfig-command up there was the interfacename bge0?
If you do an "ifconfig -a" on the server, does the value for "ether" (like ether 8:0:20:a7:d1:dc) match to the value you get when on the client you do a "arp -a" (which may look like this:   192.168.123.254       08-00-20-a7-d1-dc    where 192.168.123.254 is the ip of your server and the later should be what you got out of ifconfig -a) ?
Avatar of Sam Lee

ASKER

Is your sun-server and your client in the same network?
Yes

When you did that ifconfig-command up there was the interfacename bge0?
yes the server have a bge0 and i have added a IP as same as my LAN IP range.
ok, what about the ifconfig -a (on the server) and arp -a (on the client)... do the ethernet addresses match ?

oh yes and more more thing... do you have some sort of firewall on your client (such as norton internet security) ?
Avatar of Sam Lee

ASKER

ok, what about the ifconfig -a (on the server) and arp -a (on the client)... do the ethernet addresses match ?
Yes.

oh yes and more more thing... do you have some sort of firewall on your client (such as norton internet security) ?
I have Macafe, but In my XP box (client) I already doing telnet to some other servers.
ok, this is getting really strange....

Is the error still the same (now that you added the additional interface on the server , like this :

C:\>telnet 192.x.x.x
Connecting To 192.x.x.x...Could not open connection to the host, on port 23:
 Connect failed


And does this error come immediatly then you try it, or does it wait for some timeout ?

Avatar of Sam Lee

ASKER

it's waiting some time and giving the error !
I am wondering if it is a DNS issue.

Put your PC IP address in the /etc/hosts file on the server.

Make sure that files is before dns in the /etc/nsswitch.conf

i.e.

hosts:      files dns

Is your DNS server working, check:

nslookup www.sun.com

Regards, Nisus
Avatar of Sam Lee

ASKER

When the server starting "Hardware watchdog enabled" ???? please advice !
This is a normal message.

The OBP has a number of variables that can be set, one of these is:

watchdog-reset?=true

It can be disabled by setting it to 'false'.

Regards, Nisus.
Avatar of Sam Lee

ASKER

is there any posiblity blocking ports ?
unlikely, 'netstat -na | grep ESTABLISHED' will show you all connections.

Did you add your PC IP address to the server?
ok, as it takes some time until the error occurs, this means that the pc is most probably sending out the packets but does not get any answer (also no negative answer), then after a while it times out.

as you can ping the server, and according to arp -a you are pinging the correct server, it should not be a problem about IP's.

A few more tests:

On the server: can you telnet to the ip-address of the server (not localhost)
From the server: can you telnet to some other unix-machine (no mather what kind of unix)?
Is the Server a production Server or can you try telnetting with only a crossovercable between yur xp-machine and the server (maybe your network switch is filtering?)?
Avatar of Sam Lee

ASKER

I just added my PC IP to the server, still same condition.

Client Can ping to the Server, but server can't ping to the same client.

Server IP: 192.168.1.39
PC IP: 192.168.1.15

#
root@serverhostname# ping 192.168.1.15
ICMP Host Unreachable from gateway 192.168.1.39
 for icmp from 192.168.1.39 to pchostname192.168.1.15 (192.168.1.15)
ICMP Host Unreachable from gateway 192.168.1.39
 for icmp from 192.168.1.39 to pchostname192.168.1.15 (192.168.1.15)
ICMP Host Unreachable from gateway 192.168.1.39
 for icmp from 192.168.1.39 to pchostname192.168.1.15 (192.168.1.15)
ICMP Host Unreachable from gateway 192.168.1.39
 for icmp from 192.168.1.39 to pchostname192.168.1.15 (192.168.1.15)
ICMP Host Unreachable from gateway 192.168.1.39
 for icmp from 192.168.1.39 to pchostname192.168.1.15 (192.168.1.15)
ICMP Host Unreachable from gateway 192.168.1.39
 for icmp from 192.168.1.39 to pchostname192.168.1.15 (192.168.1.15)
^C
root@serverhostname#
Avatar of Sam Lee

ASKER

The server is SunFire V240
What do you mean by

>> I just added my PC IP to the server, still same condition.

but anyway, this looks like a subnetmask-problem. what subnetmasks do you have ?
Avatar of Sam Lee

ASKER

I have added my client machine IP to the server, hosts file.

192.168.1.0/255.255.255.0

But the server have some other IP for the same interface that's 192.9.229.x/255.255.255.0

root@serverhostname# ifconfig -a
lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
bge0: flags=11000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,FAILED> mtu 1500 index
2
        inet 192.9.229.175 netmask ffffff00 broadcast 192.9.229.255
        groupname failover_group
        ether 0:3:ba:46:e9:cb
bge0:1: flags=11000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,FAILED> mtu 1500 inde
x 2
        inet 192.168.1.39 netmask ffffff00 broadcast 192.168.1.255
bge0:2: flags=19040843<UP,BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4,NOFAILOVER
,FAILED> mtu 1500 index 2
        inet 192.9.229.150 netmask ffffff00 broadcast 192.9.229.255
bge1: flags=79040803<UP,BROADCAST,MULTICAST,DEPRECATED,IPv4,NOFAILOVER,FAILED,ST
ANDBY,INACTIVE> mtu 1500 index 3
        inet 192.9.229.151 netmask ffffff00 broadcast 192.9.229.255
        groupname failover_group
        ether 0:3:ba:46:e9:cc
root@serverhostname#
To clear these problems, we should have a clear view of your network setup

Please post from your PC the output of
  ipconfig /all
and from your Sun
  ifconfig -a
after a clean reboot (no "addif" issued or anything else).
Also, is there something in between the two machines (router, fireall, etc.)?
Avatar of Sam Lee

ASKER



Ethernet adapter LAN:

        Connection-specific DNS Suffix  . :
        Description . . . . . . . . . . . : CNet PRO200 PCI Fast Ethernet Adapter
        Physical Address. . . . . . . . . : 00-08-A1-25-F9-64
        Dhcp Enabled. . . . . . . . . . . : No
        IP Address. . . . . . . . . . . . : 192.2.229.1
        Subnet Mask . . . . . . . . . . . : 255.255.255.0
        IP Address. . . . . . . . . . . . : 192.168.1.15
        Subnet Mask . . . . . . . . . . . : 255.255.255.0
        Default Gateway . . . . . . . . . : 192.168.1.35
        DNS Servers . . . . . . . . . . . : 192.168.1.1
                                           

C:\>
OK, so we have this setup now:
PC  192.168.1.15 (class C network mask)
      192.2.229.1  (class C network)
Sun 192.9.229.175 (class C)
       192.9.229.150 (class C)
       192.168.1.39 (class C)

Connection between PC and Sun should work using the addresses of the private network 192.168.1.x/24

What looks strange is your output from the command ("Host unreachable")
  ping 192.168.1.15
on the sun. Please have name service checked with the following two commands:
  grep '^hosts:' /etc/nsswitch.conf
  getent hosts <pc-name>
Could you please post the output of
  netstat -rn
on your Sun, too?
ok, your solaris-machine has physical port bge0 and bge1 that are configured as a failover greoup (or multipath group). However both interfaces have failed. Also the multipathing does not seem to be setup completly (I am missing a data address on interface bge1, however this is not 100% needed).

as this is like this I don't think your machine is in production, right ?

Check cabling and if you dont need it then remove the multipathing-configuration (it's most probably configured in /etc/hostname.bge0 and /etc/hostname.bge1)

after this the ifconfig -a should no longer show the flag "failed". Also then you will be able to communicate using your sun-machine.
Avatar of Sam Lee

ASKER

please explain me how can i remove these add ional lines ???

root@serverhostname# cat hostname.bge0
texas netmask + broadcast + group failover_group up \
addif 192.9.229.150 netmask + broadcast + -failover deprecated up
root@serverhostname# cat hostname.bge1
192.9.229.151 netmask + broadcast + deprecated group failover_group -failover st
andby up
root@serverhostname#
ASKER CERTIFIED SOLUTION
Avatar of neteducation
neteducation

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi,

The IP addresses are causing the confusion.  Setup the V240 to have only one IP address (192.168.1.39) for now.

Make a backup of the files first:

cp -p /etc/hostname.bge0 /etc/BACKUP-hostname.bge0
cp -p /etc/hostname.bge1 /etc/BACKUP-hostname.bge1

Start first from a simply network by removing the /etc/hostname.bge1 file

Edit the hostname.bge0 file to only include the hostname 'texas'.

Make sure that 'texas' is in the /etc/hosts file:

192.168.1.39   texas

Regards, Nisus.
Something you may want to take into consideration:
a) You removed some IP addresses to make sure your system works to communicate with the PC
b) The system was originally set up for IP/MP do have some sort of failover-capabilty
c) You have lost the failover capability now!!
Although, the failover-setup was incorrect and was not able to work in tis configuration anyway!

The bottom line:
1. Check why this system was set up as originally found
2. See how it should be configured correctly

The current solution looks like a "quick hack" to me :-(