ports not working to internet ?

Asked by Goncalo Proenca

First background : I'm an absolute UNIX retarted so go easy.

I've installed Ubuntu Server, used apt-get to install apache + mysql + php + openssh +few extras , assigned a static ip - all is dandy

If I connect INSIDE my network ( from other machine on my network, but inside , locally, I can connect to the server , login using ssh, access to apache and running mysql.

problem is from outside ( internet ) - all ports are fowarded in the router to the machine, using the correct ip ( 22 for SSH, 80 for HTTP ) and nothing works.

even tried putting the IP as a DMZ zone in the router and didnt work.

seems almost that some firewall is stopping outside connections ? bad reverse dns or something ? ideias ? just go step by step please :-)

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu gnome-nettool Edit question
Assignee:
No assignee Edit question
Solved by:
Goncalo Proenca
Solved:
Last query:
Last reply:
Revision history for this message
mycae (mycae) said :
#1

>ideas ?
How are you connecting "from outside"? Is it from the internal network using the external host or IP name? You might find you are looping back onto the router itself.

Does your ISP allow services to run on low-index ports? Some ISPs filter this to limit malware scanning and protect badly configured systems; this can be true for home services at least.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#2

Can you connect OK over LAN?

Revision history for this message
Goncalo Proenca (goncalo-proenca) said :
#3

thanks for the quick answers ; heres bit more info :

ubuntu server is running on VMware. main install is OSX Server and everything works perfectly ( running server ).

I'm going to deploy a new server and want it to be ubuntu, so testing it on VMWARE.

IP is correctly configured and all nice, because if I go ( from inside the network ) to 192.168.0.10 ( Ubuntu server's static ip )all is ok.

If I go from outside, it is not :( Server is on my dad's house, so not physically next to it.

If I connect to the OSX Server via VPN, I can open the pages on the Ubuntu and all works.

If I connect directly ( DMZ'ed or not, or just ports fowarded to the 0.10 ) doesnt work

Ports are ok with ISP : if I start the SSH server on OSX and foward the router ports to the OSX server, all works. if I foward to Ubuntu, time outs, doesnt connect .

If I change the 80 port from OSX to Ubuntu, doesnt work.

So I belive its a config on the Ubuntu ( DNS ? Firewall ? )

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#4

I'd post a question on a vmware forum too, may help

Revision history for this message
mycae (mycae) said :
#5

>because if I go ( from inside the network ) to 192.168.0.10 ( Ubuntu server's static ip )all is ok.
That's not a valid external IP - it is in the range normally reserved for private networks behind NAT routers, and will be not addressable outside of your local network. I assume your network has some actual internet facing IP which you are using when you said you "go from outside"

>So I belive its a config on the Ubuntu ( DNS ? Firewall ? )
I'm not sure about this - it seems that if you can connect externally, it would be a very odd default rule that allows you to connect from one IP range, but not another, which is the only thing changing here.

Revision history for this message
Goncalo Proenca (goncalo-proenca) said :
#6

ok I got it working - basically I must have messed up the static ip config somehow - perhaps gateway ?

I reinstalled Ubuntu Server, assigned static ip, installed openSSH server, apache2 and the rest, fowarded the ports to the static ip and everything works.

sorry for the trouble and thank you for your time

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#7

Its cool, you got the gold and that's what matters :)

Revision history for this message
frank lister (flister) said :
#8

I feel your pain Goncalo.
I installed a fresh copy of Ubuntu 14.04 Desktop.
Installed LAMP.
Ran the updates and upgrades.
I used DHCP, but the router is set to give static IP to server MAC address.
Server has correct IP address.
No firewall enabled.
Router port 80 forwarding set to server's IP address (10.0.X.X).
DNS URL (my.website.com) set to Internet IP address (50.186.X.X).
Website files moved to /var/www/html/ folder.

EVERY Youtube, Walk-through, and forum I've been to have ALL had this EXACT setup.
They ALL enter their URL in a browser and BAMB! Their website pops up.
No problems.
No issues.
SOOOOO frustrating!!!!!!!!!!!!!!!!!!!!

canyouseeme.com says my port 80 is open and active.
I was able to find the solution to allowing my SSH to work from the 50.186.X.X IP address.
I know my port forwarding works, it worked fine on my Windows machine.

Should I not use DHCP? Should I force etnernet to use a static IP? Is the MAC addressing from the route the wrong way to go?

Like I said eariler, I started with a FRESH install of Ubuntu 14.04. Its the only OS on the machine.
I overwrote the hard drives and allocated all the drive space to the OS.

After the OS install, I installed LAMP. I ran the apt-get upgrades and updates. The router was already set up. I'm using the same router setting that my old Windows box used. I moved my website file to the correct /var/www/html folder. There is no firewall running on the server. SSH works on the server (from theoutside).

HTTP WILL NOT WORK OUTSIDE MY NETWORK

ARRRRGGGGGGHHHHHHHH!!!!!!!!!!!!!!!!!!!!!!!!!!