Re: localhost cannot be resolved

2000-08-15 Thread Leonard den Ottolander


Hello Alexander,

 At the same time fetchmail causes ipfw to produce these messages:
 Aug 11 21:41:47 mydomain /kernel: Connection attempt to TCP ::0001:25 from
 ::0001:1063
 Aug 11 21:41:47 mydomain /kernel: Connection attempt to TCP 127.0.0.1:113
 from 127.0.0.1:1065
 Aug 11 21:41:47 mydomain /kernel: Connection attempt to TCP ::0001:25 from
 ::0001:1066
 Aug 11 21:41:47 mydomain /kernel: Connection attempt to TCP 127.0.0.1:113
 from 127.0.0.1:1067

 These strange things started to happen soon after I cvsup'ed ports-all and
 reinstalled libtool. I also compiled firewall support into the kernel a
 few days ago. Just in case any of this might be related to the problem.

 Maybe this question sounds trivial, but do you have identd running (or what 
exactly is it called in *BSD?)? I don't know if smtp somehow depends on ident, 
some things do. Tell me if it does(n't). Maybe just rejecting connections to 
port 113 will suffice? I am not really sure about your previous configuration.

Bye,

Leonard.



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: localhost cannot be resolved

2000-08-15 Thread Leif Neland



On Fri, 11 Aug 2000, Alexander Anderson wrote:

 Hello everyone!
 
 I sent this question to freebsd-questions, but no one had replied, so I
 decided to try my luck here.
 
 I'm having trouble resolving "localhost" for telnet and fetchmail. All
 other programs (ftp, rlogin, rsh, ping, lynx) seem to understand
 "localhost".
 
I "me too"; but telnet can't resolve anything, while the others work.

I have a current workstation, which makes world almost every night. It
resolves ok.
I then have my gateway/ppp/proxy which I regularly updates by nfsmounting
/usr/src and /usr/obj from the workstation, and then make installworld.

However, something must have happened, because as mentioned telnet won't
resolve anything.

(And perl 5.6 won't install either...)

Leif



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: localhost cannot be resolved

2000-08-12 Thread Hajimu UMEMOTO

 On Fri, 11 Aug 2000 21:57:50 -0400 (EDT)
 Alexander Anderson [EMAIL PROTECTED] said:

cactoss I'm having trouble resolving "localhost" for telnet and fetchmail. All
cactoss other programs (ftp, rlogin, rsh, ping, lynx) seem to understand
cactoss "localhost".

Which version of FreeBSD are you using?

cactoss I'm going to include my configuration files. Please tell me if you'd like
cactoss to get more info on something.

cactoss  cat /etc/hosts
cactoss 127.0.0.1   localhost localhost.my.domain myname.my.domain
cactoss ::1 localhost localhost.my.domain myname.my.domain
cactoss  cat /etc/host.conf
cactoss hosts
cactoss bind
cactoss  cat /etc/resolv.conf
cactoss nameserver 209.226.175.224
cactoss nameserver 204.101.251.2

cactoss All looks right, does it?

It seems right for me.

cactoss Now, when I run telnet or fetchmail, they complain.

 telnet localhost
cactoss localhost: No address associated with hostname
 echo $?
cactoss 1

It seems getaddrinfo(3) was failed.
What's curious.  Rlogin, rsh and ftp call getaddrinfo(3), too.  Why is
it only telnet and fetchmail?

cactoss  fetchmail
cactoss 9 messages for MYUSERNAME at pop.mail.yahoo.com (64648 octets).
cactoss reading message 1 of 9 (13403 octets) .fetchmail: SMTP connect to
cactoss localhost failed
cactoss fetchmail: SMTP transaction error while fetching from pop.mail.yahoo.com
cactoss fetchmail: Query status=SMTP
 echo $?
cactoss 10

cactoss At the same time fetchmail causes ipfw to produce these messages:
cactoss Aug 11 21:41:47 mydomain /kernel: Connection attempt to TCP ::0001:25 from
cactoss ::0001:1063
cactoss Aug 11 21:41:47 mydomain /kernel: Connection attempt to TCP 127.0.0.1:113
cactoss from 127.0.0.1:1065
cactoss Aug 11 21:41:47 mydomain /kernel: Connection attempt to TCP ::0001:25 from
cactoss ::0001:1066
cactoss Aug 11 21:41:47 mydomain /kernel: Connection attempt to TCP 127.0.0.1:113
cactoss from 127.0.0.1:1067

You don't have SMTP/IPv6 listen.  This should be OK.
So, SMTP connection to ::1 was fail.  Then, SMTP connection to
127.0.0.1 was tried.
It seems IDENT query was made in correspondings to SMTP connection to
127.0.0.1.  I think you have SMTP/IPv4 listen.

cactoss Actually, could someone tell me, what does ::0001 mean? Should this be in
cactoss /etc/hosts with an alias of localhost?

::0001 is same as ::1.  Leading zero can be omittled in IPv6 address
format.

cactoss These strange things started to happen soon after I cvsup'ed ports-all and
cactoss reinstalled libtool. I also compiled firewall support into the kernel a
cactoss few days ago. Just in case any of this might be related to the problem.

I think libtool has no relation with this problem.  It may rely on
firewall rule.

--
Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan
[EMAIL PROTECTED]  [EMAIL PROTECTED]  [EMAIL PROTECTED]
http://www.imasy.org/~ume/


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: localhost cannot be resolved

2000-08-12 Thread Alexander Anderson

 Which version of FreeBSD are you using?

4.0-RELEASE

  telnet localhost
 cactoss localhost: No address associated with hostname
  echo $?
 cactoss 1
 
 It seems getaddrinfo(3) was failed.
 What's curious.  Rlogin, rsh and ftp call getaddrinfo(3), too.  Why is
 it only telnet and fetchmail?

I tried to look at the sources for telnet. In file commands.c:2292, there's
an assignment of variable "family". I couldn't understand where the variable
is coming from. Still, I wrote a simple program to see under what
circumstances getaddrinfo fails for localhost. It doesn't seem to fail at
all?!..

#include stdio.h
#include sys/types.h
#include sys/socket.h
#include netdb.h
#include string.h

int main( int argc, char** argv ) {
  struct addrinfo hints, *res;
  int status;
  
  if ( argc != 2 ) {
fprintf( stderr, "usage: %s hostname\n", argv[0] );
exit(2);
  }
  
  memset( hints, 0, sizeof(hints) );
  /*hints.ai_flags = AI_NUMERICHOST;*/
  /*hints.ai_flags = AI_PASSIVE;*/
  hints.ai_flags = AI_CANONNAME;
  /*hints.ai_family = PF_UNSPEC;*/
  hints.ai_family = AF_INET6;
  hints.ai_socktype = SOCK_STREAM;

  status = getaddrinfo( argv[1], "telnet", hints, res );
  if ( status == 0 ) {
printf( "success\n" );
  } else {
fprintf( stderr, "%s\n", gai_strerror( status ) );
  }
  
  return 0;
}

[skipped]

 You don't have SMTP/IPv6 listen.  This should be OK.
 So, SMTP connection to ::1 was fail.  Then, SMTP connection to
 127.0.0.1 was tried.
 It seems IDENT query was made in correspondings to SMTP connection to
 127.0.0.1.  I think you have SMTP/IPv4 listen.

Yes, sendmail is listening on port 25. I can telnet 127.0.0.1 25.

Could you please take a look at `ifconfig lo0`:

lo0: flags=8049UP,LOOPBACK,RUNNING,MULTICAST mtu 16384
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x6 
inet6 ::1 prefixlen 128 
inet 127.0.0.1 netmask 0xff00 

Does it look okay?

[skipped]

 I think libtool has no relation with this problem.  It may rely on
 firewall rule.

My firewall is open. I decided that I'd only block certain ports:

# ipfw show
00100  560   33466 allow ip from any to any via lo0
002000   0 deny ip from any to 127.0.0.0/8
00300   21 924 allow tcp from any to any 25 via tun0 setup
00400   572524 allow tcp from any to any 80 via tun0 setup
00500   10 424 deny tcp from any to any 1-1024 in recv tun0
00600   682860 deny tcp from any 1-1024 to any out xmit tun0
007000   0 deny tcp from any to any 6000-6063 in recv tun0
008000   0 deny tcp from any 6000-6063 to any out xmit tun0
009000   0 deny tcp from any to any 3306 in recv tun0
010000   0 deny tcp from any 3306 to any out xmit tun0
65000 4982 1773612 allow ip from any to any
655350   0 deny ip from any to any

I also tried flushing all the rules and allowing all traffic to see whether
the firewall was the cause of my problem. I didn't change anything, so I
doubt it is the firewall.

One question. Firewall rules apply to both IPv4 and IPv6, right? There
shouldn't be separate rules to IPv6, should there?

Thanks!


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: localhost cannot be resolved

2000-08-12 Thread Hajimu UMEMOTO

 On Sat, 12 Aug 2000 10:47:43 -0400 (EDT)
 Alexander Anderson [EMAIL PROTECTED] said:

 Which version of FreeBSD are you using?

cactoss 4.0-RELEASE

Please update to 4.1-RELEASE.  4.0-RELEASE's getaddrinfo(3) has DNS
query order problem and it was fixed in 4.1-RELEASE.
Or, at least you should update libc/net/getaddrinfo.c and
libc/net/name6.c
I don't know why getaddrinfo(3) fails for localhost query, exactly.
However, probably updating to 4.1-RELEASE fixes your problem.

cactoss I tried to look at the sources for telnet. In file commands.c:2292, there's
cactoss an assignment of variable "family". I couldn't understand where the variable
cactoss is coming from.

The variable `family' is came from command line of telnet.  If -4 is
specified, telnet tries only AF_INET.  If -6 is specified, telnet
tries only AF_INET6.  Default is AF_UNSPEC, that is try both IPv6 and
IPv4.

cactoss Could you please take a look at `ifconfig lo0`:

cactoss lo0: flags=8049UP,LOOPBACK,RUNNING,MULTICAST mtu 16384
cactossinet6 fe80::1%lo0 prefixlen 64 scopeid 0x6 
cactossinet6 ::1 prefixlen 128 
cactossinet 127.0.0.1 netmask 0xff00 

cactoss Does it look okay?

It seems fine.

cactoss One question. Firewall rules apply to both IPv4 and IPv6, right? There
cactoss shouldn't be separate rules to IPv6, should there?

No.  Rules for IPv6 is set separately by ip6fw.  Firewall for IPv6 is
enabled by specifying `options IPV6FIREWALL' in your kernel config.

--
Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan
[EMAIL PROTECTED]  [EMAIL PROTECTED]  [EMAIL PROTECTED]
http://www.imasy.org/~ume/


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



localhost cannot be resolved

2000-08-11 Thread Alexander Anderson

Hello everyone!

I sent this question to freebsd-questions, but no one had replied, so I
decided to try my luck here.

I'm having trouble resolving "localhost" for telnet and fetchmail. All
other programs (ftp, rlogin, rsh, ping, lynx) seem to understand
"localhost".

I'm going to include my configuration files. Please tell me if you'd like
to get more info on something.

 cat /etc/hosts
127.0.0.1   localhost localhost.my.domain myname.my.domain
::1 localhost localhost.my.domain myname.my.domain
 cat /etc/host.conf
hosts
bind
 cat /etc/resolv.conf
nameserver 209.226.175.224
nameserver 204.101.251.2

All looks right, does it?

Now, when I run telnet or fetchmail, they complain.

 telnet localhost
localhost: No address associated with hostname
 echo $?
1

 fetchmail
9 messages for MYUSERNAME at pop.mail.yahoo.com (64648 octets).
reading message 1 of 9 (13403 octets) .fetchmail: SMTP connect to
localhost failed
fetchmail: SMTP transaction error while fetching from pop.mail.yahoo.com
fetchmail: Query status=SMTP
 echo $?
10

At the same time fetchmail causes ipfw to produce these messages:
Aug 11 21:41:47 mydomain /kernel: Connection attempt to TCP ::0001:25 from
::0001:1063
Aug 11 21:41:47 mydomain /kernel: Connection attempt to TCP 127.0.0.1:113
from 127.0.0.1:1065
Aug 11 21:41:47 mydomain /kernel: Connection attempt to TCP ::0001:25 from
::0001:1066
Aug 11 21:41:47 mydomain /kernel: Connection attempt to TCP 127.0.0.1:113
from 127.0.0.1:1067

Actually, could someone tell me, what does ::0001 mean? Should this be in
/etc/hosts with an alias of localhost?

These strange things started to happen soon after I cvsup'ed ports-all and
reinstalled libtool. I also compiled firewall support into the kernel a
few days ago. Just in case any of this might be related to the problem.

Thank you all for any suggestions!



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message