LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 01-28-2015, 03:09 PM   #16
Rotwang2
Member
 
Registered: Aug 2014
Distribution: Ubuntu, Centos, Fedora
Posts: 210

Original Poster
Rep: Reputation: Disabled

Quote:
Originally Posted by suicidaleggroll View Post
Maybe you should try temporarily disabling SELinux and/or iptables, just to see if it's causing the problem? Once you know what's blocking the connection you can work through the problem. Until then you're just shooting blind.

Sure, good idea- remind me quick question how do I disable iptables (and how do I restart it)? I'll do it right now. (Actually iptables will presumably run again if I just restart the box right?_

And yea- the whole point here is to find out what's blocking the connection,

thanks,

rw
 
Old 01-28-2015, 03:10 PM   #17
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
Something like "service iptables stop" should kill it, and you can use start/restart to bring it back up. Unless you disable the service, it will come back up on a reboot as well.

SELinux is a bit more "involved" and I believe requires a full reboot to turn it off/on. In my experience, SELinux is the cause of about 99.7% of these kinds of problems on RHEL/CentOS systems.

Last edited by suicidaleggroll; 01-28-2015 at 03:12 PM.
 
Old 01-28-2015, 03:27 PM   #18
Rotwang2
Member
 
Registered: Aug 2014
Distribution: Ubuntu, Centos, Fedora
Posts: 210

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by suicidaleggroll View Post
Something like "service iptables stop" should kill it, and you can use start/restart to bring it back up. Unless you disable the service, it will come back up on a reboot as well.

SELinux is a bit more "involved" and I believe requires a full reboot to turn it off/on. In my experience, SELinux is the cause of about 99.7% of these kinds of problems on RHEL/CentOS systems.

Crap there's no "service" command. I also checked in /usr/sbin, not there either. Running locate obviously produces 9 billion results for "service".

But anyway- gotta point out, I used to be able to get into this box from the outside, and I haven't changed the firewall or even upgraded centos at all since then.

Anyway, thanks and please advice,

rw
 
Old 01-28-2015, 03:35 PM   #19
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
How about "/etc/init.d/iptables stop"
 
Old 01-28-2015, 03:47 PM   #20
Rotwang2
Member
 
Registered: Aug 2014
Distribution: Ubuntu, Centos, Fedora
Posts: 210

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by suicidaleggroll View Post
How about "/etc/init.d/iptables stop"

I shoulda thought of that, since it would run on init.

So yea, just killed iptables, tried sshing back in from the outside, no go, still times out.

m

Last edited by Rotwang2; 01-28-2015 at 03:48 PM.
 
Old 01-28-2015, 03:54 PM   #21
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
Then you can try shutting off selinux, reboot, see if it works, if not stop iptables again (so both selinux and iptables are off) and try again. To shut off SELinux you edit /etc/selinux/config and change SELINUX=enforcing to SELINUX=disabled, and reboot.

If there's still no luck, flip them both back on and continue your search.
 
Old 01-28-2015, 04:26 PM   #22
Rotwang2
Member
 
Registered: Aug 2014
Distribution: Ubuntu, Centos, Fedora
Posts: 210

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by suicidaleggroll View Post
Then you can try shutting off selinux, reboot, see if it works, if not stop iptables again (so both selinux and iptables are off) and try again. To shut off SELinux you edit /etc/selinux/config and change SELINUX=enforcing to SELINUX=disabled, and reboot.

If there's still no luck, flip them both back on and continue your search.
Ugh now the box isn't booting, now I have to plug in keyboard and monitor, ugh ugh ugh. I'll let you know if I can bring the box back up at all, thanks so far,

rw
 
Old 01-28-2015, 04:34 PM   #23
Rotwang2
Member
 
Registered: Aug 2014
Distribution: Ubuntu, Centos, Fedora
Posts: 210

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Rotwang2 View Post
Ugh now the box isn't booting, now I have to plug in keyboard and monitor, ugh ugh ugh. I'll let you know if I can bring the box back up at all, thanks so far,

rw

Now my machine won't come back up. And I mean, I get nothing on the screen at all. I don't even hear the drive running.

My box is bricked.
 
Old 01-28-2015, 04:35 PM   #24
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
That sucks, power supply failure?
 
Old 01-28-2015, 04:36 PM   #25
Rotwang2
Member
 
Registered: Aug 2014
Distribution: Ubuntu, Centos, Fedora
Posts: 210

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Rotwang2 View Post
Now my machine won't come back up. And I mean, I get nothing on the screen at all. I don't even hear the drive running.

My box is bricked.

Wait, this doesn't make any sense- only when I unplugged the monitor did it suddenly start booting. WTF?

Edit: by that I mean unplugged IT from the monitor.
 
Old 01-28-2015, 04:42 PM   #26
Rotwang2
Member
 
Registered: Aug 2014
Distribution: Ubuntu, Centos, Fedora
Posts: 210

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Rotwang2 View Post
Wait, this doesn't make any sense- only when I unplugged the monitor did it suddenly start booting. WTF?

Edit: by that I mean unplugged IT from the monitor.
Anyway, it's up now, after I turned off selinux. (btw it was set to "permissive" before. Still times out when I try to ssh from the outside.
 
Old 01-29-2015, 12:44 AM   #27
zafar_dandoti
Member
 
Registered: Dec 2005
Location: India
Distribution: centos
Posts: 178

Rep: Reputation: 13
'iptables -L'display current rules. Backup the iptables file(/etc/sysconfig/iptables) then flush the rules 'iptables -F' this will clear all rules. Also set selinux to permissive mode 'setenforce 0' and try SSHing.
 
Old 01-29-2015, 11:05 PM   #28
zafar_dandoti
Member
 
Registered: Dec 2005
Location: India
Distribution: centos
Posts: 178

Rep: Reputation: 13
Have u look if there is entry in host.allow (sshd:internalsubnet)& host.deny file.
(sshd: ALL)
 
Old 02-04-2015, 02:48 PM   #29
Rotwang2
Member
 
Registered: Aug 2014
Distribution: Ubuntu, Centos, Fedora
Posts: 210

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by zafar_dandoti View Post
Have u look if there is entry in host.allow (sshd:internalsubnet)& host.deny file.
(sshd: ALL)
Both files are empty.
 
Old 02-04-2015, 04:06 PM   #30
fogpipe
Member
 
Registered: Mar 2011
Distribution: Slackware 64 -current,
Posts: 550

Rep: Reputation: 196Reputation: 196
I dont know if this will help but have you tried running sshd so that it listens on a non-standard port? I have had internet service providers swear up and down that they dont block services and then as soon as you run the problem service on a non-standard port it works fine. You can configure the port in sshd.conf.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 to give access to user only home directory through ssh? jeevar Linux - Newbie 1 08-06-2012 08:51 AM
Unable to access home directory of AD user after logging in via SSH with Samba transient Linux - Software 1 08-24-2011 12:01 PM
Accessing external SSH from a PC with only port 80 access wanted.alive Linux - Networking 11 12-27-2010 02:26 PM
Folder Max Size and Limiting SSH access to home folder. Mefistofeles Linux - General 4 11-26-2005 02:09 PM
SuseFirewall2 and external SSH access connection timed out usmanaziz Linux - Distributions 1 09-03-2004 03:15 AM

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

All times are GMT -5. The time now is 03:45 PM.

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