Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 178
  • Last Modified:

Apache timeout remote connection if not port 80

Hi

I can access http on port 80 remotly, while when i change the port to other ports 9080, i can connect locally but not remotely.

Note:
Apache version: 2.4
Destribution: centos 7
Firewall status: disabled
SELINUX: disabled

Configuration:
Listen 9080

Thanks in advance
0
Rawand Amin
Asked:
Rawand Amin
  • 3
  • 2
  • 2
  • +2
1 Solution
 
Jan SpringerCommented:
What do you see when run wireshark?
0
 
jessbruffettCommented:
Are you trying to set the port in the main httpd.conf file or the vhost config file? in my experience leave as much default in the httpd file as you can and set your custom settings in the vhost config file.
0
 
Jan SpringerCommented:
I do the same (making mods in the vhosts) but I sometimes also run several instances of apache and it should work fine to just make the change in the regular configuration file.
0
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 
jessbruffettCommented:
Also for the OP, an eternal question but one that has bitten me more than once, after making the changes you did restart the apache process correct?
0
 
Kent WSr. Network / Systems AdminCommented:
Sound like you may have a default (or other than default) iptables rules set applied?
What is the output of
iptables -L -n
?
0
 
Jan SpringerCommented:
The firewall should be disabled according to the author.
0
 
Kent WSr. Network / Systems AdminCommented:
I glossed right over that, Jan.   Thank you.

OP, can you define "locally"? Is this from the same machine, as in localhost you are hitting apache, or is locally referring to the same LAN / network segment? Is there any security device or NAT device between the apache box and where you are testing from "remotely"?
0
 
Rawand AminAuthor Commented:
Thank you all, I will keep port 80 as default.  it is much easier.
0
 
skullnobrainsCommented:
most likely the port 9080 is closed on the client side

you can debug this quite easily
- check with "netstat -lptn" that you actually bind the proper interface(s)
- run "tcpdump -i any port 9080" and try to connect. if nothing appears, your connection does not reach. if you see SYNs but no ACKs something is wrong with the local machine configuration : firewall, apparamor, binding the wrong interface ....
0
 
Rawand AminAuthor Commented:
Thanks for your help
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now