Find the answer to your Linux question:
Results 1 to 2 of 2
-A FORWARD -p udp -m udp -j LOG --log-prefix " IPT " -A FORWARD -p tcp -m tcp --tcp-flags SYN,RST,ACK SYN -j LOG --log-prefix " IPT " for store iptables ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2007
    Posts
    98

    how to change rsyslog date format.


    -A FORWARD -p udp -m udp -j LOG --log-prefix " IPT "
    -A FORWARD -p tcp -m tcp --tcp-flags SYN,RST,ACK SYN -j LOG --log-prefix " IPT "

    for store iptables log to some.log


    rsyslog.conf

    :msg,contains," IPT " /log/some.log
    & ~
    *.info;mail.none;authpriv.none;cron.none /var/log/messages

    output

    Dec 1 16:59:58 server kernel: IPT IN=eth1 OUT=eth0 SRC=x.x.x.x DST=x.x.x.x LEN=52 TOS=0x00 PREC=0x00 TTL=127 ID=19653 DF PROTO=TCP SPT=1175 DPT=22790 WINDOW=65535 RES=0x00 SYN URGP=0

    i want to change datetime format

    from


    Dec 1 16:59:58

    to

    1/12/2013 16:59:58



    thank you for advanced.

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,517
    Read the rsyslog.conf man page. It tells you (not simply, but it does tell you) how to change date formatting to what you prefer.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •