LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-24-2017, 05:16 PM   #1
NotionCommotion
Member
 
Registered: Aug 2012
Posts: 789

Rep: Reputation: Disabled
What might be blocking sockets only on certain ports?


I have a socket server listening to 0.0.0.0:80. I can connect to it from a socket client operating on another machine using 1.2.3.4:80 (where 1.2.3.4 is the server's IP).

Then I change from port 80 to 1337, and can no longer connect. The firewall is disabled. But I can connect if the client is operating on the same machine as the server.

It is a new server operating Centos7. My old Centos6 server did accept connections.

What should I investigate? Thank you
 
Old 05-24-2017, 05:35 PM   #2
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924
Is SELinux blocking access to the port?
 
Old 05-24-2017, 06:58 PM   #3
NotionCommotion
Member
 
Registered: Aug 2012
Posts: 789

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by hydrurga View Post
Is SELinux blocking access to the port?
Damn that SELinux! I bet you are right.

I've never messed around with it much. In the past, I always disabled it, but really wanted to give it a closer look and determine whether I start using it.
 
Old 05-24-2017, 09:11 PM   #4
NotionCommotion
Member
 
Registered: Aug 2012
Posts: 789

Original Poster
Rep: Reputation: Disabled
Nope, sestatus shows SELinux status as being disabled. I was sure you were right!
 
Old 05-24-2017, 10:53 PM   #5
NotionCommotion
Member
 
Registered: Aug 2012
Posts: 789

Original Poster
Rep: Reputation: Disabled
Turned out to be a physical firewall above my virtual server.
 
Old 05-25-2017, 03:36 AM   #6
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924
Quote:
Originally Posted by NotionCommotion View Post
Turned out to be a physical firewall above my virtual server.
Glad you found the problem.

Can you mark the thread as "Solved"? (see "Thread Tools" at the top of the thread)

Onwards and upwards!
 
  


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
[python] reading non-blocking sockets with makefile Ephracis Programming 0 02-25-2009 06:22 PM
How to use poll() with non-blocking sockets tnjones Programming 3 10-12-2008 09:55 AM
Problem w/ sockets, fdopen, and blocking. 95se Programming 3 11-17-2005 12:38 PM
Non blocking sockets in Perl ivanatora Programming 3 08-19-2005 02:14 AM
Set/Unset Non-Blocking sockets? zer0python Programming 2 01-04-2004 01:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:51 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