Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 12-19-2017, 06:14 AM   #1
LQ Newbie
Registered: Dec 2017
Posts: 1

Rep: Reputation: Disabled
problem in iptables logging nat in Ubuntu 14

I'm trying to configure logining for "natting in iptables" but the kern.log doesn't log anything moreover I've changed the path for log file to /var/log/iptables.log but it still the same!.

Applied Steps:

create File /etc/rsyslog.d/10-my_iptables.conf

Log kernel generated iptables log messages to file

msg,contains,"netfiltered " /var/log/iptables.log
& ~

Add these lines

iptables -t nat -I PREROUTING 1 -j LOG --log-prefix='[netfilter ] '
iptables -t nat -I POSTROUTING 1 -j LOG --log-prefix='[netfilter ] '
iptables -t nat -I OUTPUT 1 -j LOG --log-prefix='[netfilter ] '
iptables-save > /etc/iptables/rules.v4<br/>

Restart rsyslog

service rsyslog restart

I did above steps but iptables.log didn't log any thing. I hope help from specialest.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
iptables and NAT in Ubuntu 10 ryanmission Linux - Networking 1 03-07-2011 05:13 PM
IPTables NAT Problem pshoaf Linux - Networking 1 10-21-2010 01:30 PM
iptables nat 1 to 1 problem ched Linux - Networking 1 04-27-2005 08:27 PM
Squid NAT logging problem ncorreia Linux - Software 0 09-23-2004 06:52 AM
iptables NAT problem dave92082 Linux - Networking 1 06-16-2004 06:02 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:23 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration