I have ports 37000-37100 redirected to my computer. SSH is accessible when listening on any of these ports (by default I'm using 37022, but tried on 37080 and it's OK).

I can only access Nginx on a local IP (example: http : // 192 .168 .49 .198 : 37080), though. When I try to connect from outside (http : // our_network's_ip:37080), the browser times out after a while. PLEASE READ UPDATE BELOW. I installed Apache just to make sure and it's the same. Stock install, only ports are changed.

The UTF is disabled.

I've done it a hundred times on various home networks and it always worked. This time it's an office network and I'm not the person who configures the router. I'd say the problem's there, but SSH is working... .

Ubuntu 12.10.

Any ideas?

UPDATE: actually I can access my computer from outside networks, I only can't access my computer FROM my own network when I use my network's "external" IP.


On your host where the Nginx runs, try using tcpdump to monitor if there are any packets arriving on your server where you expect them. Otherwise the problem is almost certainly some other configuration like in the router or whatever other network devices you have.

for example to see packets on tcp port 37080 it would be

tcpdump -i any tcp port 37080 
  • I've tried it and it doesn't show any traffic. There's more info, though, please see UPDATE in the original post.
    – muszek
    Feb 22 '13 at 14:00

It sounds like NAT is setup on the router with a specified port number for http Its the only thing I can think of off the cuff To be honest, you do not make it clear where your network is in relation to your work network

show ip nat translations
Pro Inside global      Inside local       Outside local      Outside global
tcp   ---                ---

I would guess, it was a NAT problem.

Let's say the network's gateway had a public IP gat_public_ip and a private IP The gateway was configured with a simple DNAT rule from ports 37000-37100 of gat_public_ip to the OP's private IP

When we try to connect from the internal network, let's say port 1234 to port 37000 of gat_public_ip the following happens:

  • the SYN packet with source and destination gat_public_ip:37000 exits the internal host,
  • the gateway applies the DNAT and resends the packet on the internal network: source and destination,
  • the OP's workstation answers with a SYN/ACK: source and destination, which is sent directly to the initiating host.
  • the kernel of drops the SYN/ACK since it never sent anything to192.168.49.198:37000` (it is unaware of the DNAT on the gateway).

The DNAT works correctly, when connecting from the outside: the source address of the packet is not on the internal network 192.168.49/24 and OP's workstation sends the answer to the gateway, which reverses the DNAT.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.