[syslog-ng] Localport() & localip() cause syntax error

simonst at wellsfargo.com simonst at wellsfargo.com
Fri Mar 30 00:56:02 CEST 2007


Maybe I'm misunderstanding the semicolons, but I intended the tcp(...) to
contain the localip() & localport() ip address, in addition to the usual ip
address and port of the target server.  These syslog-ng tcpip connections
are running with IPSec encryption, and now I'd like to lock in the tcp
client-side port & interface instead of defaulting to 0.0.0.0 and a
dynamically-assigned port.

Where should any semicolons go in:
	 tcp( "..." port(..) localip(..) localport(..) template(....) )

-----Original Message-----
From: syslog-ng-bounces at lists.balabit.hu
[mailto:syslog-ng-bounces at lists.balabit.hu] On Behalf Of Evan Rempel
Sent: Thursday, March 29, 2007 2:23 PM
To: Syslog-ng users' and developers' mailing list
Subject: Re: [syslog-ng] Localport() & localip() cause syntax error

simonst at wellsfargo.com wrote:
> My syslog-ng (2.0.2) client works fine with a tcp destination: 
> 
> 	destination centralLog { tcp("10.11.12.13" port(5432); 
>                                    template("$UNIXTIME $HOST $MESSAGE\n");
> ); };
> 
> but gets a syntax error when I add localip() and localport():
> 
> 	destination centralLog { tcp("10.11.12.13" port(5432); 
>                                    localip(10.9.8.7) localport(5432);
>                                    template("$UNIXTIME $HOST $MESSAGE\n");
> ); };

The basic syntax of the line is wrong in terms of brackets and semicolons

destination centralLog { tcp("10.11.12.13" port(5432) localip(10.9.8.7)
localport(5432) template("$UNIXTIME $HOST 
$MESSAGE\n"); };

A single *network* destination is all done within one set of ();
and multiple of these can be in one destination spec

destination centralLog { tcp(...); tcp(...); tcp(...); };

where the ... contains all of the options/settings for the single *network*
destination.

Evan.

> 
> I've tried various combinations of localip() & localport(), and also
> semicolons.  
> Can anyone see what's wrong?
> 
> 
> Here's the entire syslog-ng.conf:
> 
> options { long_hostnames(off); sync(0); };
> source src { unix-stream("/dev/log"); internal(); };
> source kernsrc { file("/proc/kmsg"); };
> destination messages {
>    file("/var/log/messages.$MON$DAY"
>    owner(root) group(abcde) perm(0644));
>    };
> destination centralLog  { tcp("10.11.12.13"  port(5432)
localip("10.9.8.7");
> localport(5432);
>                                          template("$UNIXTIME $HOST
> $MESSAGE\n"); ); };
> destination centralLog2 { tcp("10.21.22.23"  port(5432)
localip("10.9.8.7")
> localport(5432)
>                                          template("$UNIXTIME $HOST
> $MESSAGE\n") ); };
> log { source(src); source(kernsrc); destination(centralLog);
> destination(centralLog2);
>                                     destination(messages); };
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> syslog-ng maillist  -  syslog-ng at lists.balabit.hu
> https://lists.balabit.hu/mailman/listinfo/syslog-ng
> Frequently asked questions at http://www.campin.net/syslog-ng/faq.html
> 


-- 
Evan Rempel                erempel at uvic.ca
Senior Programmer Analyst        250.721.7691
Computing Services
University of Victoria
_______________________________________________
syslog-ng maillist  -  syslog-ng at lists.balabit.hu
https://lists.balabit.hu/mailman/listinfo/syslog-ng
Frequently asked questions at http://www.campin.net/syslog-ng/faq.html


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5621 bytes
Desc: not available
Url : http://lists.balabit.hu/pipermail/syslog-ng/attachments/20070329/ce0f5d9c/smime-0001.bin


More information about the syslog-ng mailing list