Skip to content

Instantly share code, notes, and snippets.

@flrichar
Created January 13, 2026 16:18
Show Gist options
  • Select an option

  • Save flrichar/079b39957d08ebc117abeb2eb28ebafa to your computer and use it in GitHub Desktop.

Select an option

Save flrichar/079b39957d08ebc117abeb2eb28ebafa to your computer and use it in GitHub Desktop.
plab postrouting snat table rules

Output of PLab PostRouting for NAT Table, CNI, Bridge, SNAT-1022

$ iptables -t nat -L POSTROUTING -vn --line
Chain POSTROUTING (policy ACCEPT 3159 packets, 581K bytes)
num   pkts bytes target     prot opt in     out     source               destination         
1     4217  663K CNI-HOSTPORT-MASQ  all  --  *      *       0.0.0.0/0            0.0.0.0/0            /* CNI portfwd requiring masquerade */
2     1058 81606 CNI-8d379e8c80a1fb6e997fb316  all  --  *      *       10.4.0.2             0.0.0.0/0            /* name: "bridge" id: "moby-0b65d5a522417587f04a5f4429c5b63ec2fca1065291d12c7f91b158cf18f8e1" */
3        0     0 MASQUERADE  all  --  *      eth0.87  10.16.22.0/24       !10.0.0.0/8           /* SNAT 1022 through eth0.87 via fiber-inetgw */

...$

Avoid natting complications whenever possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment