Tiny Core Extensions > TCE Q&A Forum
iptables log location?
Adam:
I was wondering where is the location of iptables log since there is no such "/var/log/messages" log in TCL.
I've generated some traffic and it seems like iptables has blocked the traffic. I would like to see what kind of traffic has been blocked.
Thanks
--- Quote ---tc@box:/var/log$ sudo /usr/local/sbin/basic-firewall
Your basic firewall is now [operational]
Press enter to continue
tc@box:/var/log$
tc@box:/var/log$ sudo iptables --line-numbers -vL
Chain INPUT (policy DROP 150 packets, 41007 bytes)
num pkts bytes target prot opt in out source destination
1 0 0 ACCEPT all -- lo any anywhere anywhere
2 164 16608 ACCEPT all -- any any anywhere anywhere state RELATED,ESTABLISHED
3 0 0 REJECT tcp -- any any anywhere anywhere tcp dpt:auth reject-with tcp-reset
Chain FORWARD (policy DROP 202 packets, 10536 bytes)
num pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 129 packets, 27318 bytes)
num pkts bytes target prot opt in out source destination
tc@box:/var/log$
tc@box:/var/log$ ls -lah
total 4
drwxrwxr-x 2 root staff 80 Jun 13 12:11 ./
drwxrwxr-x 8 root staff 180 Jul 4 2016 ../
-rw-r--r-- 1 root root 0 Jun 13 12:11 autologin
-rw-rw-r-- 1 root staff 1.9K Jun 13 12:52 wtmp
tc@box:/var/log$
--- End quote ---
Juanito:
You need to use the "syslog" boot code to get /var/log/messages
curaga:
..and you also need to have a LOG rule set for iptables to log anything.
Adam:
--- Quote from: Juanito on June 13, 2017, 01:12:10 AM ---You need to use the "syslog" boot code to get /var/log/messages
--- End quote ---
Thanks Juanito,
Do you have the config sample of the boot code with syslog?
Juanito:
--- Code: ---menuentry "core" {
linux /boot/vmlinuz quiet text tce=UUID="9b0807fd-1d0c-4c7b-94cd-853923c34e55" waitusb=10:UUID="9b0807fd-1d0c-4c7b-94cd-853923c34e55" noutc syslog
initrd /boot/rootfs.gz /boot/modules.gz
}
--- End code ---
Navigation
[0] Message Index
[#] Next page
Go to full version