iptables rules for
nat table and chain
POSTROUTING look like:
Chain POSTROUTING (policy ACCEPT) target prot opt source destination LOG all -- anywhere anywhere LOG level warning prefix " packet-pre-snat" MASQUERADE all -- anywhere anywhere LOG all -- anywhere anywhere LOG level warning prefix " packet-post-snat"
And I send a HTTP request between hosts an then look at log, I see only one entry:
Mar 15 08:41:55 vpn-instance5 kernel: [ 385.657182] packet-pre-snatIN= OUT=ens5 SRC=10.132.0.2 DST=10.0.0.24 LEN=60 TOS=0x00 PREC=0x00 TTL=61 ID=40 DF PROTO=TCP SPT=53896 DPT=443 WINDOW=65320 RES=0x00 SYN URGP=0
Why do I see only one entry?
- I expect at least some entries (because there are many packets exchanged to establish a TCP connection.
- I see pre-snet log entries. Why I don't see post-snat entries (the third rule in iptables)