diff --git a/syslog/redirectap33.sh b/syslog/redirectap33.sh old mode 100644 new mode 100755 index 24f78c9..d266fcc --- a/syslog/redirectap33.sh +++ b/syslog/redirectap33.sh @@ -1,4 +1,5 @@ #!/bin/bash -iptables -t nat -A PREROUTING -d 10.121.38.33 -p udp --dport 515 -j DNAT --to-port 192.168.0.40:514 -iptables -t nat -A POSTROUTING -d 192.168.0.40 -p udp --dport 515 -j SNAT --to 10.121.38.32 +echo "1" > /proc/sys/net/ipv4/ip_forward +sudo iptables -t nat -A PREROUTING -d 10.121.38.33 -p udp --dport 515 -j DNAT --to-dest 192.168.0.40:514 +sudo iptables -t nat -A POSTROUTING -d 192.168.0.40 -p udp --dport 515 -j SNAT --to 10.121.38.33 diff --git a/syslog/rsyslog b/syslog/rsyslog new file mode 100644 index 0000000..8d521ca --- /dev/null +++ b/syslog/rsyslog @@ -0,0 +1,25 @@ +/var/log/syslog +/var/log/mail.info +/var/log/mail.warn +/var/log/mail.err +/var/log/mail.log +/var/log/daemon.log +/var/log/kern.log +/var/log/auth.log +/var/log/user.log +/var/log/lpr.log +/var/log/cron.log +/var/log/debug +/var/log/messages +{ + rotate 4 + weekly + missingok + notifempty + compress + delaycompress + sharedscripts + postrotate + /usr/lib/rsyslog/rsyslog-rotate + endscript +}