logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Hardware & Networking View previous topic :: View next topic
Reply to topic   Topic: exposing ports on a debian server
Author
tdelacour



Joined: 23 Oct 2015
Posts: 1

PostPosted: Fri 23 Oct '15 19:42    Post subject: exposing ports on a debian server Reply with quote

Hi all and thanks in advance.

I am trying to set up a simple apache server. Right now I'm stuck on the fact that I cannot access the server from the outside world. Say the host is named "a.b.c.d".

Here is what I can do:
ping a.b.c.d
ssh account@a.b.c.d
curl localhost (after ssh-ing into the host)

Here is what I cannot do:
curl a.b.c.d
curl a.b.c.d:80
curl a.b.c.d:443
(similar with telnet)

I am guessing that this means that ports 80 and/or 443 are not exposed, or publicly available on the internet. Unfortunately I don't have enough knowledge to understand specifically what this means and how to fix it.

Details about the machine:
- Debian Jessie
- Apache2 2.4.10
:~$ netstat -an | egrep 'Proto|LISTEN'
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:953 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN
tcp6 0 0 :::80 :::* LISTEN
tcp6 0 0 :::22 :::* LISTEN
tcp6 0 0 ::1:5432 :::* LISTEN
tcp6 0 0 ::1:953 :::* LISTEN
tcp6 0 0 :::443 :::* LISTEN
tcp6 0 0 :::32769 :::* LISTEN
tcp6 0 0 :::32770 :::* LISTEN

I can also provide config details for apache.

Also, small note: I have sudo access to this machine, but not root access. I read that this might be a problem with ports under 1024. If this is the case, that is OK because I really only need to have a couple of high-number ports open, which I am forwarding to the port 80 on some docker containers (also running apache). As it stands now, I cannot curl into those ports either, e.g. curl a.b.c.d:32769 does not work either.

Thanks and please let me know if I can clarify anything or provide additional information!
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Sat 24 Oct '15 13:18    Post subject: Reply with quote

By default debian doesn't block any port.
The question for internal access is if those names are in the /etc/hosts file aka local DNS.

Having sudo is like being root Wink


What is the Listen set to in the apache config files?
Just plain Listen 80 and Listen 443 or are they bind to an IP adress?

you might also check the iptables with

sudo iptables -L

to see if the ports are blocked.
Back to top


Reply to topic   Topic: exposing ports on a debian server View previous topic :: View next topic
Post new topic   Forum Index -> Hardware & Networking