Skip to content

Instantly share code, notes, and snippets.

@ipkpjersi
Created June 11, 2023 05:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ipkpjersi/febb2a6e671537afe6746f226d094790 to your computer and use it in GitHub Desktop.
Save ipkpjersi/febb2a6e671537afe6746f226d094790 to your computer and use it in GitHub Desktop.
openvpn-server nat iptables
Chain PREROUTING (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
28115 1551K DNAT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:15986 to:10.8.0.2:15986
34 1484 DNAT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:8443 to:10.8.0.2:443
0 0 DNAT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:8443 to:10.8.0.2:443
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain POSTROUTING (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
880K 50M SNAT all -- * * 10.8.0.0/24 !10.8.0.0/24 to:5x.xx.xx.xx
28118 1551K SNAT tcp -- * * 0.0.0.0/0 10.8.0.2 tcp dpt:15986 to:5x.xx.xx.xx
34 1484 SNAT tcp -- * * 0.0.0.0/0 10.8.0.2 tcp dpt:443 to:5x.xx.xx.xx
0 0 SNAT tcp -- * * 0.0.0.0/0 10.8.0.2 tcp dpt:443 to:5x.xx.xx.xx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment