laptop = 192.168.2.145 and is connected to the DD-WRT by WiFi
printer = 192.168.2.108 and is connected to the DD-WRT by LAN-PORT
Code:
iptables -I FORWARD -i br0 -j LOG --log-ip-options
Will only capture packets that leave the WAN interface for the internet.
for example
Code:
Feb 10 15:17:29 tier2router user.warn kernel: IN=br0 OUT=vlan1 SRC=192.168.2.145 DST=87.248.210.254 LEN=52 TOS=0x00 PREC=0x00 TTL=63 ID=59937 DF PROTO=TCP SPT=45324 DPT=80 WINDOW=226 RES=0x00 ACK URGP=0
Feb 10 15:17:29 tier2router user.warn kernel: IN=br0 OUT=vlan1 SRC=192.168.2.145 DST=87.248.210.254 LEN=52 TOS=0x00 PREC=0x00 TTL=63 ID=30735 DF PROTO=TCP SPT=45326 DPT=80 WINDOW=192 RES=0x00 ACK URGP=0
Tried the following. It records traffic in the opposite direction.
Code:
iptables -I FORWARD -i vlan1 -j LOG --log-ip-options
Code:
Feb 10 15:19:42 tier2router user.warn kernel: IN=vlan1 OUT=br0 SRC=87.248.210.254 DST=192.168.2.145 LEN=52 TOS=0x00 PREC=0x00 TTL=54 ID=53033 DF PROTO=TCP SPT=80 DPT=45521 WINDOW=12466 RES=0x00 ACK URGP=0
If I try and ping my printer, no logging occurs.
Tried also
Code:
iptables -I FORWARD -i vlan0 -j LOG --log-ip-options
Does not capture any logs from the Internet or from pinging the printer.
Code:
iptables -I FORWARD -i vlano -j LOG --log-ip-options