127.0.0.1 redirects on http://opendns.org

Hello guys and girls!

I have a problem with local server. I installed ruby and rails, than started dev server at 127.0.0.1:8080. After typing 127.0.0.1:8080 in to web browser, it redirects me at OpenDNS | DNS-Based Web Security … why?

I setup DHCP in network configuration. Internet works fine.

Thank You.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

You either typo’d something or your browser is really, really messed up.
Typing 127.x.x.x (replacing ‘x’ with any valid IP digit from 0-255)
should always go to your local system. To verify post the output from
the following commands:

ip addr
ip route
netcat -zv 127.0.0.1 8080
netstat -planet | grep 'LISTEN ’

Good luck.


Want to yell at me in person?
Come to BrainShare 2011 in October: http://tinyurl.com/brainshare2011
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJOkuWMAAoJEF+XTK08PnB51I8P/3//keXLF27NLAGiPoo9dWHm
CtuSdXVuIetCJfrYqtxNz260+XfLP3dE7WQMPnfVjiwzeFZzAS/gyvHB6hpdfGBD
HitvPot00y9V3hdzF+coUWCKWffRAON/1R1TVLzqflUw1efB3jyRks5Q5lDzdQb8
iLGShq7cxb0fkGkz9DiTekXp0tdQHc05UU99ObzBz909sfnMppienhONANDBvuSR
HoRLFZ3KScmsCHrs2gWychWCdr3JKM14tf6jkgGMW++o5XCSVh7e+Hbn+txRKsgh
PPu1Czo8OVDdkPK8jghkLU5aaM6z8m9NEmWff6SiR8VX/BdaLLhu/Qurcb1PWi3I
At6lrx3GU7ZlrPfGU6+eRFM0bLvsyEQ0u0ddSll6C4w8DsMw/FGXoLDDqB8R2AE4
JqaS1yJ4O2E8Dl77189u8xyrrBrMuVSZf1A+rxXGFD0VDTIQ+b9s+NIeaVTscXuh
4yDYsyFG9/kQSn28UWRWKSMR8xg2gIMGdWrITKBJzU8wKnItRJUlBR1q5fIE4iKL
ZmybwioriRVRugO1wEI60qaOFDB18iYuj05e6hrk9UCDC4m9JZMqGsxIbGMoxjQ0
W8gkUQ/ICAqdjxqhg6dhSswLz2oTjWSAOrQg+3M8aVp5VJIFu9JCL0/yNv7KjCBZ
sgh13S3ejBDic7fCT2Zs
=V2WQ
-----END PGP SIGNATURE-----

user0707 wrote:
> I have a problem with local server. I installed ruby and rails, than
> started dev server at 127.0.0.1:8080. After typing 127.0.0.1:8080 in to
> web browser, it redirects me at ‘OpenDNS | DNS-Based Web Security’
> (http://opendns.org) … why?

Also, use wget instead of your browser to make the HTTP request. That
way you, and we, can see exactly what happened.

ip addr

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
inet 127.0.0.2/8 brd 127.255.255.255 scope host secondary lo
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:1e:0b:a9:e6:96 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.100/24 brd 192.168.0.255 scope global eth0

ip route

192.168.0.0/24 dev eth0 proto kernel scope link src 192.168.0.100
169.254.0.0/16 dev eth0 scope link
127.0.0.0/8 dev lo scope link
default via 192.168.0.1 dev eth0

netcat -zv 127.0.0.1 8080

localhost [127.0.0.1] 80 (http) open

netstat -planet | grep 'LISTEN '

tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 0 4969 2359/rpcbind
tcp 0 0 127.0.0.1:80 0.0.0.0:* LISTEN 0 56106 6479/ruby
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 0 7554 2330/sshd
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 0 8237 2434/cupsd
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 0 5100 2516/master
tcp 0 0 :::111 :::* LISTEN 0 4974 2359/rpcbind
tcp 0 0 :::22 :::* LISTEN 0 7556 2330/sshd

Also please do:

cat /etc/hosts

It’s “fresh” installation, I do not modify anything.

cat /etc/hosts

hosts This file describes a number of hostname-to-address

mappings for the TCP/IP subsystem. It is mostly

used at boot time, when no name servers are running.

On small systems, this file can be used instead of a

“named” name server.

Syntax:

IP-Address Full-Qualified-Hostname Short-Hostname

127.0.0.1 localhost

special IPv6 addresses

::1 localhost ipv6-localhost ipv6-loopback

fe00::0 ipv6-localnet

ff00::0 ipv6-mcastprefix
ff02::1 ipv6-allnodes
ff02::2 ipv6-allrouters
ff02::3 ipv6-allhosts
192.168.0.115 linux-oa9d.site linux-oa9d

Is this setup one machine or two? Is the web browser on the same machine as the RoR server?

Some odd things: Ruby is listening on port 80, not port 8080. This means you must have run RoR as root, which is not good practice. Another odd thing is that you asked netcat to scan port 8080, but the answer says port 80.

Please post results within code tags so that we can see if you have put some spaces where you are not supposed to.

Also what release of openSUSE, in case that is important?

One machine. Yes.

I tried on different one (8080, 80 (with sudo), 8181 etc.)

I didn’t modified any config file, so there is no possibility to find some syntax error.

11.4

wget http://127.0.0.1:80


asking libproxy about url 'http://127.0.0.1/'
libproxy suggest to use 'direct://'
--2011-10-10 17:05:41--  http://127.0.0.1/
Connecting 127.0.0.1:80... connected.
(...) 301 MOVED PERMANENTLY
Localization: http://www.127.0.0.1/
asking libproxy about url 'http://www.127.0.0.1/'
libproxy suggest to use 'direct://'
--2011-10-10 17:05:41--  http://www.127.0.0.1/
translation www.127.0.0.1... 67.215.77.132
Connecting www.127.0.0.1|67.215.77.132|:80... connected.
(...) 303 See Other
Localization: http://guide.a.id.opendns.com/?url=www%2E127%2E0%2E0%2E1
asking libproxy about url 'http://guide.a.id.opendns.com/?url=www%2E127%2E0%2E0%2E1'
libproxy suggest to use 'direct://'
--2011-10-10 17:05:42--  http://guide.a.id.opendns.com/?url=www%2E127%2E0%2E0%2E1
Translation guide.a.id.opendns.com... 67.215.67.10

(...)

--2011-10-10 17:05:42--  http://guide.opendns.com/?url=www%2E127%2E0%2E0%2E1
Translation guide.opendns.com... 208.69.35.136
Connecting guide.opendns.com|208.69.35.136|:80... connected.
(...)... 200 OK
Length: 1270 (1,2K) [text/html]
Save to: `index.html?url=www.127.0.0.1.3'

100%==========================================================================================================================================&gt;] 1.270       --.-K/s   w  0s      

2011-10-10 17:05:43 (93,5 MB/s) - saved `index.html?url=www.127.0.0.1.3' [1270/1270]

Reinstalled system => everything works fine now.

o_O