Page MenuHomeVyOS Platform

syslog can't be configured with an ipv6 literal destination in 1.2.x
Closed, ResolvedPublicBUG

Description

In 1.1.x, we could configure syslog to send to an IPv6 address with set system syslog host "[a:b:c:d]:514" facility blah level blah. In 1.2.x, "host" can only be an IPv4 literal or a hostname. Any chance we can get back the ability to send to an IPv6 address?

Details

Difficulty level
Unknown (require assessment)
Version
1.2.6-S1
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)

Related Objects

Mentioned In
1.2.9

Event Timeline

Try one of them options

set system static-host-mapping host-name n1.log.local inet '2001:db8::2'
set system syslog host n1.log.local facility all
set system syslog host n1.log.local port '514'
set system syslog host 2001:db8::2 facility all
set system syslog host 2001:db8::2 port '514'

1.1.8 configuration

set system syslog host [2001:db8::2]:514 facility all level 'all'

Can't migrate to 1.2

syslog.png (296×773 px, 9 KB)

Expected format @[2001:db8::2]:514

# sudo cat /etc/rsyslog.d/vyos-rsyslog.conf 

## generated by syslog.py ##
## file based logging
$outchannel global,/var/log/messages,262144,/usr/sbin/logrotate /etc/logrotate.d/vyos-rsyslog
*.notice;local7.debug :omfile:$global
## remote logging
*.* @[2001:db8::2]:514

Fixed in VyOS 1.4-rolling-202103110218

set system syslog global facility all level 'info'
set system syslog global facility protocols level 'debug'
set system syslog host 192.168.122.1 facility all level 'all'
set system syslog host 192.168.122.1 port '514'
set system syslog host 2001:db8::2 facility all level 'all'
set system syslog host 2001:db8::3 facility all level 'all'
set system syslog host 2001:db8::3 port '514'
set system syslog host 2001:db8::4 facility all level 'all'
set system syslog host 2001:db8::4 port '514'

Rsyslog

vyos@r-roll01# sudo cat /etc/rsyslog.d/vyos-rsyslog.conf 
## generated by syslog.py ##
## file based logging
$outchannel global,/var/log/messages,262144,/usr/sbin/logrotate /etc/logrotate.d/vyos-rsyslog
*.info;local7.debug :omfile:$global
## console logging
## remote logging
*.* @192.168.122.1:514
*.* @[2001:db8::2]
*.* @[2001:db8::3]:514
*.* @[2001:db8::4]:514

It can be "cherry-picked" to 1.3

syncer claimed this task.
syncer moved this task from Needs Triage to Finished on the VyOS 1.2 Crux (VyOS 1.2.9) board.
syncer moved this task from Finished to Backlog on the VyOS 1.2 Crux (VyOS 1.2.9) board.
syncer reopened this task as Backport pending.Oct 17 2021, 12:19 PM
syncer reassigned this task from syncer to Viacheslav.
syncer triaged this task as Normal priority.
syncer moved this task from Backlog to In Progress on the VyOS 1.2 Crux (VyOS 1.2.9) board.
syncer added a subscriber: syncer.

@Viacheslav we need to port this to 1.2 too

PR for "crux": https://github.com/vyos/vyos-1x/pull/1029

set system syslog global facility all level 'info'
set system syslog global facility protocols level 'debug'
set system syslog host 192.168.122.1 facility all level 'all'
set system syslog host 192.168.122.1 port '514'
set system syslog host 2001:db8::2 facility all level 'all'
set system syslog host 2001:db8::3 facility all level 'all'
set system syslog host 2001:db8::3 port '514'
set system syslog host 2001:db8::4 facility all level 'all'
set system syslog host 2001:db8::4 port '514'

Generated rsyslog file:

vyos@r12-lts# sudo cat /etc/rsyslog.d/vyos-rsyslog.conf 

## generated by syslog.py ##
## file based logging
$outchannel global,/var/log/messages,262144,/usr/sbin/logrotate /etc/logrotate.d/vyos-rsyslog
*.info;local7.debug :omfile:$global
## remote logging
*.* @192.168.122.1:514
*.* @[2001:db8::2]
*.* @[2001:db8::4]:514
*.* @[2001:db8::3]:514
[edit]