From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
---|---|
To: | Edoardo Panfili <edoardo(at)aspix(dot)it>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: psql connection via localhost or 127.0.0.1 |
Date: | 2014-11-06 16:01:32 |
Message-ID: | 545B9B5C.4030503@aklaver.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 11/06/2014 07:57 AM, Edoardo Panfili wrote:
> Il 06/11/14 16:47, John R Pierce ha scritto:
>> On 11/6/2014 7:36 AM, Edoardo Panfili wrote:
>>>> grep localhost /etc/hosts
>>> 127.0.0.1 localhost
>>> 127.0.1.1 host.host host
>>
>> wahaaaa?
>>
>> whats the output of ...
>>
>> # ifconfig lo
>> lo Link encap:Local Loopback
>> inet addr:127.0.0.1 Mask:255.0.0.0
>> inet6 addr: ::1/128 Scope:Host
>> UP LOOPBACK RUNNING MTU:65536 Metric:1
>> RX packets:18367154 errors:0 dropped:0 overruns:0 frame:0
>> TX packets:18367154 errors:0 dropped:0 overruns:0 carrier:0
>> collisions:0 txqueuelen:0
>> RX bytes:23279985092 (21.6 GiB) TX bytes:23279985092 (21.6
>> GiB)
>>
> # ifconfig lo
> lo Link encap:Local Loopback
> inet addr:127.0.0.1 Mask:255.0.0.0
> inet6 addr: ::1/128 Scope:Host
> UP LOOPBACK RUNNING MTU:65536 Metric:1
> RX packets:3306 errors:0 dropped:0 overruns:0 frame:0
> TX packets:3306 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:0
> RX bytes:2544659 (2.4 MiB) TX bytes:2544659 (2.4 MiB)
>
>> note that net mask? the loopback interface is the entire
>> 127.0.0.0/8 network you can't put a host at 127.0.1.x and expect it
>> to work right.
>>
>> you should instead use one of the RFC1918 reserved subnets for a
>> private network, within 10.0.0.0/8 or 172.16.0.0/12, or
>> 192.168.0.0/16 (you can use these with any mask size you want, for
>> instance, /24 is usually used with 192.168.x.y)
> I can't figure why 127.0.1.1 is there (I will remove it) is an (almost)
> new installation on a virtual machine,
See the link I sent to John.
>
>
> Edoardo
>
>
>
--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Edoardo Panfili | 2014-11-06 16:02:42 | Re: psql connection via localhost or 127.0.0.1 |
Previous Message | Edoardo Panfili | 2014-11-06 15:57:27 | Re: psql connection via localhost or 127.0.0.1 |