LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-24-2003, 06:17 PM   #1
begacjj
LQ Newbie
 
Registered: Jun 2003
Location: Olympia, WA USA
Distribution: Red Hat 7.3
Posts: 6

Rep: Reputation: 0
Can't ssh to server when server is in runlevel 5?


Hello,

When I switch our server to runlevel 5 from runlevel 3 I loose ssh and httpd access into our server? I ran serviceconf after booting into runlevel 5 and made sure the xinetd, ssh and httpd services were enabled. When the server is in runlevel 3 ssh and httpd work perfectly? Also, I can startx from runlevel 3 and ssh and httpd still work? I am running Redhat 7.3 and OpenSSH. I don't have much experience working with X as I have always worked in runlevel 3 previously. I may be going about this the wrong way. What I am trying to do is get a program to run upon startup. This program has to be run from an xterm. Currently, if I reboot our server I have to then login locally, startx and then run the program from the xterm. When I do that the program works as well as ssh and httpd. The problem is this server is going to be installed remotely so I need the program to run automatically if the server gets reset. Sorry if this is to much of a newbie question to be in the Networking forum?

Any help would be greatly appreciated.

Thanks,

Chris
 
Old 06-25-2003, 01:21 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Try:
chkconfig --level 345 httpd on
chkconfig --level 345 sshd on
 
Old 06-25-2003, 02:36 PM   #3
begacjj
LQ Newbie
 
Registered: Jun 2003
Location: Olympia, WA USA
Distribution: Red Hat 7.3
Posts: 6

Original Poster
Rep: Reputation: 0
David,

Thanks for the suggestion but unfortunately that did not solve my problem. Httpd was already turned on in 3,4,5 and sshd was turned on in 3 and 5 but not 4. Sshd is now on in 3,4,5 but still can't access the server via ssh or httpd although they are running on the server?? Any other ideas?

Thanks,

Chris
 
Old 06-25-2003, 03:45 PM   #4
Crashed_Again
Senior Member
 
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503

Rep: Reputation: 57
chkconfig justs adds the daemons to the appropriate runlevel so that they are started during boot time. It does not start the services. Did you do:

/etc/init.d/sshd restart

????

Does it say that stopping sshd failed? If so, it was not on.
 
Old 06-25-2003, 04:06 PM   #5
begacjj
LQ Newbie
 
Registered: Jun 2003
Location: Olympia, WA USA
Distribution: Red Hat 7.3
Posts: 6

Original Poster
Rep: Reputation: 0
Crahsed_Again,

I booted into runlevel 5 after running chkconfig and ran:

/etc/rc.d init.d/sshd status

and it says it is running??
 
Old 06-26-2003, 12:25 PM   #6
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Maybe you have firewall rules that are blocking it.
 
Old 06-26-2003, 12:42 PM   #7
begacjj
LQ Newbie
 
Registered: Jun 2003
Location: Olympia, WA USA
Distribution: Red Hat 7.3
Posts: 6

Original Poster
Rep: Reputation: 0
I don't think so, both the server I am trying to ssh into and the PC I am sshing from are on our LAN and the firewall only blocks incoming traffic from outside of our LAN, plus I can ssh into the server if I boot into runlevel 3?? Is there some sort of firewall rules within the O/S that would not be enabled in runlevel 3 but enabled in runlevel 5?

Thanks,
 
Old 06-26-2003, 12:46 PM   #8
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
It is possible that they could be conficured to be different. Why don;t you just look at your rules and see if there are any that would block access.
 
Old 06-26-2003, 12:50 PM   #9
begacjj
LQ Newbie
 
Registered: Jun 2003
Location: Olympia, WA USA
Distribution: Red Hat 7.3
Posts: 6

Original Poster
Rep: Reputation: 0
I have always used hardware based firewall rules so I am not familiar with where to look in the O/S for the rules. Can you point me in the right direction?

Thanks for all of your help
 
Old 06-26-2003, 12:53 PM   #10
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
It depends if you are using iptables or ipchains - one will give you an error - the other should work:
ipchains -L
iptables -L
 
Old 06-26-2003, 01:09 PM   #11
begacjj
LQ Newbie
 
Registered: Jun 2003
Location: Olympia, WA USA
Distribution: Red Hat 7.3
Posts: 6

Original Poster
Rep: Reputation: 0
It looks like I am using IPtables.


[root@test sysconfig]# iptables -L
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
[root@test sysconfig]# iptables -L
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


I couldn't quite make sense of the help file for /sbin/iptables? How do I display and edit the actual rules?

Thanks again for you help
 
Old 06-26-2003, 01:15 PM   #12
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Those are the rules - you are allowing eveything and denying nothing so that isn't the problem
 
  


Reply



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
How the DNS-server is connected to work of a web-server and a mail-server? ukrainet Linux - Newbie 2 01-10-2005 09:18 PM
can we configure a Linux server with mail server,file server and web server kumarx Linux - Newbie 5 09-09-2004 06:21 AM
Unable to access my ssh server and ftp server from the Internet, but smtp works foxone Linux - Networking 1 05-28-2004 05:17 PM
SSh Server help RockHound Linux - Software 1 03-04-2003 11:28 PM
router, name server, web server, ssh, mailserver dilberim82 Linux - Security 9 07-26-2001 06:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:54 AM.

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
Open Source Consulting | Domain Registration