Logging, Syslog and Log Anaylsys Forums
July 30, 2010, 09:40:27 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
   Home   WIKI BLOG Help Search Recent Topics GoogleTagged Login Register  
Pages: [1]
  Print  
Author Topic: defining source port for log shipping frm proxy to webserver!!  (Read 1434 times)
m6d4
Newbie
*
Offline Offline

Posts: 2


View Profile
« on: May 14, 2009, 09:26:33 pm »

Hi there,

This should be pretty easy for you guys. I just could not get around how to do it myself. I have syslog-ng config from proxy server to ship all the logs to webserver ( both RH5.3 )

I have squid  logging to a pipe and then deliver the logs to squid dest server on port 514 as following ..

template t_squid {
 template("$MSG\n"); template_escape(no);
};

source s_squid {
pipe("/var/log/squid/vhostlog.pipe");
};

destination d_squid {
 tcp("dest_server_ip" port(514) log_fifo_size(2048));
 file("/var/log/squid/vhosts/vhosts.log" template(t_squid_entry));
};

With this configuration, I want the source port to configured to be lets say 5144 so that it connect to dest_server_ip on 514 but now its randomly connecting from >1023 port.

Thanks in adv
M
Logged
Admin
Administrator
Newbie
*****
Offline Offline

Posts: 146


View Profile WWW
« Reply #1 on: May 15, 2009, 05:33:16 am »

Try using localport(514) like this:

template t_squid {
 template("$MSG\n"); template_escape(no);
};

source s_squid {
pipe("/var/log/squid/vhostlog.pipe");
};

destination d_squid {
 tcp("dest_server_ip" port(514) localport(514); log_fifo_size(2048));
 file("/var/log/squid/vhosts/vhosts.log" template(t_squid_entry));
};
Logged
m6d4
Newbie
*
Offline Offline

Posts: 2


View Profile
« Reply #2 on: June 11, 2009, 01:10:35 am »

Thanks for the reply.. I am testing this one .. just found that we prob. dont need semi colon after localport (514) coz it fails to restart.

Regards
=M
Logged
Pages: [1]
  Print  

 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC | Sitemap Valid XHTML 1.0! Valid CSS!