# FreeBSD 8 inetd problem



## Ofloo (Feb 27, 2011)

I have 2 servers with exactly the same inetd.conf.


```
# uname -a
FreeBSD xxxx.xxxx.net 8.1-RELEASE-p2 FreeBSD 8.1-RELEASE-p2 #3: Fri Jan  7 00:17:02 CET 2011     
[email]ofloo@xxxx.xxxx.net[/email]:/usr/obj/usr/src/sys/OFL  amd64
```

Here it works:

config:


```
pop3   stream  tcp     nowait  root    /usr/local/libexec/ipop3d       ipop3d
imap   stream  tcp     nowait  root    /usr/local/libexec/imapd        imapd
pop3s   stream  tcp     nowait  root    /usr/local/libexec/ipop3d       ipop3d
imaps   stream  tcp     nowait  root    /usr/local/libexec/imapd        imapd

pop3   stream  tcp6     nowait  root    /usr/local/libexec/ipop3d       ipop3d
imap   stream  tcp6     nowait  root    /usr/local/libexec/imapd        imapd
pop3s   stream  tcp6     nowait  root    /usr/local/libexec/ipop3d       ipop3d
imaps   stream  tcp6     nowait  root    /usr/local/libexec/imapd        imapd
```


```
# inetd -d
ADD : tftp proto=udp accept=0 max=1 user=root group=(null)class=daemon builtin=0x0 server=/usr/libexec/tftpd policy=""
inetd: tftp/udp: ipsec initialization failed; in entrust
inetd: tftp/udp: ipsec initialization failed; out entrust
inetd: enabling tftp, fd 4
inetd: registered /usr/libexec/tftpd on 4
ADD : tftp proto=udp accept=0 max=1 user=root group=(null)class=daemon builtin=0x0 server=/usr/libexec/tftpd policy=""
inetd: tftp/udp: ipsec initialization failed; in entrust
inetd: tftp/udp: ipsec initialization failed; out entrust
inetd: enabling tftp, fd 5
inetd: registered /usr/libexec/tftpd on 5
ADD : pop3 proto=tcp accept=1 max=0 user=root group=(null)class=daemon builtin=0x0 server=/usr/local/libexec/ipop3d policy=""
inetd: pop3/tcp: ipsec initialization failed; in entrust
inetd: pop3/tcp: ipsec initialization failed; out entrust
inetd: enabling pop3, fd 6
inetd: registered /usr/local/libexec/ipop3d on 6
ADD : imap proto=tcp accept=1 max=0 user=root group=(null)class=daemon builtin=0x0 server=/usr/local/libexec/imapd policy=""
inetd: imap/tcp: ipsec initialization failed; in entrust
inetd: imap/tcp: ipsec initialization failed; out entrust
inetd: enabling imap, fd 7
inetd: registered /usr/local/libexec/imapd on 7
ADD : pop3s proto=tcp accept=1 max=0 user=root group=(null)class=daemon builtin=0x0 server=/usr/local/libexec/ipop3d policy=""
inetd: pop3s/tcp: ipsec initialization failed; in entrust
inetd: pop3s/tcp: ipsec initialization failed; out entrust
inetd: enabling pop3s, fd 8
inetd: registered /usr/local/libexec/ipop3d on 8
ADD : imaps proto=tcp accept=1 max=0 user=root group=(null)class=daemon builtin=0x0 server=/usr/local/libexec/imapd policy=""
inetd: imaps/tcp: ipsec initialization failed; in entrust
inetd: imaps/tcp: ipsec initialization failed; out entrust
inetd: enabling imaps, fd 9
inetd: registered /usr/local/libexec/imapd on 9
ADD : pop3 proto=tcp accept=1 max=0 user=root group=(null)class=daemon builtin=0x0 server=/usr/local/libexec/ipop3d policy=""
inetd: pop3/tcp: ipsec initialization failed; in entrust
inetd: pop3/tcp: ipsec initialization failed; out entrust
inetd: enabling pop3, fd 10
inetd: registered /usr/local/libexec/ipop3d on 10
ADD : imap proto=tcp accept=1 max=0 user=root group=(null)class=daemon builtin=0x0 server=/usr/local/libexec/imapd policy=""
inetd: imap/tcp: ipsec initialization failed; in entrust
inetd: imap/tcp: ipsec initialization failed; out entrust
inetd: enabling imap, fd 11
inetd: registered /usr/local/libexec/imapd on 11
ADD : pop3s proto=tcp accept=1 max=0 user=root group=(null)class=daemon builtin=0x0 server=/usr/local/libexec/ipop3d policy=""
inetd: pop3s/tcp: ipsec initialization failed; in entrust
inetd: pop3s/tcp: ipsec initialization failed; out entrust
inetd: enabling pop3s, fd 12
inetd: registered /usr/local/libexec/ipop3d on 12
ADD : imaps proto=tcp accept=1 max=0 user=root group=(null)class=daemon builtin=0x0 server=/usr/local/libexec/imapd policy=""
inetd: imaps/tcp: ipsec initialization failed; in entrust
inetd: imaps/tcp: ipsec initialization failed; out entrust
inetd: enabling imaps, fd 13
inetd: registered /usr/local/libexec/imapd on 13
```

result:

```
# sockstat -46lp993
USER     COMMAND    PID   FD PROTO  LOCAL ADDRESS         FOREIGN ADDRESS      
root     inetd      96073 10 tcp4   *:993                 *:*
root     inetd      96073 14 tcp6   *:993                 *:*
```

Here it doesn't. The problem is tcp6. For some reason it thinks it is the same as tcp.


```
# uname -a
FreeBSD xxxxx.xxxxxx.net 8.1-RELEASE-p2 FreeBSD 8.1-RELEASE-p2 #1: Thu Jan  6 19:22:34 CET 2011     [email]ofloo@xxxxx.xxxxx.net[/email]:/usr/obj/usr/src/sys/OFL  amd64
```

config:


```
pop3   stream  tcp     nowait  root    /usr/local/libexec/ipop3d       ipop3d
imap   stream  tcp     nowait  root    /usr/local/libexec/imapd        imapd
pop3s   stream  tcp     nowait  root    /usr/local/libexec/ipop3d       ipop3d
imaps   stream  tcp     nowait  root    /usr/local/libexec/imapd        imapd

pop3    stream  tcp6    nowait  root    /usr/local/libexec/ipop3d       ipop3d
imap    stream  tcp6    nowait  root    /usr/local/libexec/imapd        imapd
pop3s   stream  tcp6    nowait  root    /usr/local/libexec/ipop3d       ipop3d
imaps   stream  tcp6    nowait  root    /usr/local/libexec/imapd        imapd
```


```
# inetd -d
ADD : pop3 proto=tcp accept=1 max=0 user=root group=(null)class=daemon builtin=0x0 server=/usr/local/libexec/ipop3d policy=""
inetd: pop3/tcp: ipsec initialization failed; in entrust
inetd: pop3/tcp: ipsec initialization failed; out entrust
inetd: enabling pop3, fd 4
inetd: registered /usr/local/libexec/ipop3d on 4
ADD : imap proto=tcp accept=1 max=0 user=root group=(null)class=daemon builtin=0x0 server=/usr/local/libexec/imapd policy=""
inetd: imap/tcp: ipsec initialization failed; in entrust
inetd: imap/tcp: ipsec initialization failed; out entrust
inetd: enabling imap, fd 5
inetd: registered /usr/local/libexec/imapd on 5
ADD : pop3s proto=tcp accept=1 max=0 user=root group=(null)class=daemon builtin=0x0 server=/usr/local/libexec/ipop3d policy=""
inetd: pop3s/tcp: ipsec initialization failed; in entrust
inetd: pop3s/tcp: ipsec initialization failed; out entrust
inetd: enabling pop3s, fd 6
inetd: registered /usr/local/libexec/ipop3d on 6
ADD : imaps proto=tcp accept=1 max=0 user=root group=(null)class=daemon builtin=0x0 server=/usr/local/libexec/imapd policy=""
inetd: imaps/tcp: ipsec initialization failed; in entrust
inetd: imaps/tcp: ipsec initialization failed; out entrust
inetd: enabling imaps, fd 7
inetd: registered /usr/local/libexec/imapd on 7
ADD : pop3 proto=tcp accept=1 max=0 user=root group=(null)class=daemon builtin=0x0 server=/usr/local/libexec/ipop3d policy=""
inetd: pop3/tcp: ipsec initialization failed; in entrust
inetd: pop3/tcp: ipsec initialization failed; out entrust
inetd: enabling pop3, fd 8
inetd: registered /usr/local/libexec/ipop3d on 8
ADD : imap proto=tcp accept=1 max=0 user=root group=(null)class=daemon builtin=0x0 server=/usr/local/libexec/imapd policy=""
inetd: imap/tcp: ipsec initialization failed; in entrust
inetd: imap/tcp: ipsec initialization failed; out entrust
inetd: enabling imap, fd 9
inetd: registered /usr/local/libexec/imapd on 9
ADD : pop3s proto=tcp accept=1 max=0 user=root group=(null)class=daemon builtin=0x0 server=/usr/local/libexec/ipop3d policy=""
inetd: pop3s/tcp: ipsec initialization failed; in entrust
inetd: pop3s/tcp: ipsec initialization failed; out entrust
inetd: enabling pop3s, fd 10
inetd: registered /usr/local/libexec/ipop3d on 10
ADD : imaps proto=tcp accept=1 max=0 user=root group=(null)class=daemon builtin=0x0 server=/usr/local/libexec/imapd policy=""
inetd: imaps/tcp: ipsec initialization failed; in entrust
inetd: imaps/tcp: ipsec initialization failed; out entrust
inetd: bind failed on imaps/tcp: Address already in use
inetd[67930]: imaps/tcp: bind: Address already in use
```

syslog: inetd[67930]: 
	
	



```
imaps/tcp: bind: Address already in use
```

result: 


```
# sockstat -46lp993
USER     COMMAND    PID   FD PROTO  LOCAL ADDRESS         FOREIGN ADDRESS      
root     inetd      68151 8  tcp4   *:993                 *:*
```

If I remove the tcp6 from the config, no errors..


----------

