[syslog-ng] syslog-ng and IPv6 Interface Binding

Reuben Farrelly reuben-syslogng-list at reub.net
Tue Apr 5 15:25:49 CEST 2011


On 5/04/2011 11:01 PM, Gergely Nagy wrote:
> Reuben Farrelly<reuben-syslogng-list at reub.net>  writes:
>
>> I was hoping for a config like this (IPv6 address truncated somewhat):
>>
>> source net {
>>           tcp6( ip(2001::20) port(601) max_connections(25) );
>>           udp6( ip(2001::20) port(601) max_connections(25) );
>> };
>>
>> But seems to be a no-go:
>>
>> -----
>>
>> Error parsing afsocket, syntax error, unexpected LL_NUMBER, expecting
>> LL_IDENTIFIER or LL_STRING in /etc/syslog-ng/syslog-ng.conf at line 32,
>> column 18:
>>
>>           tcp6( ip(2001::20) port(601) max_connections(25) );
>>                    ^^^^
>> -----
>
> I haven't tested it yet, but my vague guess is that ip("2001::20")
> should work. (The documentation does mention that ip() expects a string
> value)
>
> However, I haven't tried this, so your mileage may vary.

With the quotes it seems to at least now start up and listen on the 
right interfaces - thanks Gergely!

Looks like the problem I was seeing was that quotes are required for 
specifying IPv6 addresses, but are not required for IPv4 addresses.  For 
example this config loads fine:

source net {
         tcp6( ip("2001::20") port(514) max_connections(25) );
         udp6( ip("2001::20") port(514) );
         tcp( ip(192.168.10.12) port(514) max_connections(25) );
};

Perhaps this can be added to the admin guide, as the behavior of this 
parameter is inconsistent, at least, between v4 and v6.

Thanks,
Reuben


More information about the syslog-ng mailing list