1

I have a problem that I cannot access a web page when using eth0 interface. If I use loopback interface everything works fine.

wget http: //127.0.0.1:8080/app - works ok wget http: //192.168.50.129:8080/app - connection refused.

I'm doing this on the same machine.

Any ideas what might be the problem?

markovuksanovic
  • 277
  • 1
  • 4

3 Answers3

2

First check if your webserver is listening on eth0 and not just lo

$ netstat -ntlp

If that is okay then do a telnet on port 8080 to see if the port is open.

$ telnet 192.168.50.129 8080

If the telnet doesn't work check your firewall rules.

$ iptables -L -n

Sameer
  • 4,118
  • 2
  • 17
  • 11
2

First you should check the Listen directive in your server configuration

   Listen 8080

should listen on all interfaces, port 8080.

In doubt you can specify several times the same directives

  Listen 127.0.0.1:8080
  Listen 192.168.50.129:8080

and restart the server.

If your firewall drops the packets, you wouldn't have connection refused, so I think it is more a web server configuration problem.


If you are using nginx and not apache, check your server section(s) and the same remark applies
  listen 8080;

or

  listen 127.0.0.1:8080;
  listen 192.168.50.129:8080;
Déjà vu
  • 5,546
  • 9
  • 36
  • 55
  • This most likely is the problem.... But I still have to figure out how to make a service listen on some other interface. I need to make Oracle 10g XE listen on that interface. – markovuksanovic Dec 09 '10 at 17:23
0

It could be that you have a

Listen 127.0.0.1:8080

in your /etc/apache2/ports.conf?

Or a

<VirtualHost 127.0.0.1:8080>

under your sites configuration (usually /etc/apache2/sites-available/default or analogue)

Daniele Santi
  • 2,529
  • 1
  • 25
  • 22