Skip to content

Instantly share code, notes, and snippets.

@candale
Last active May 7, 2019 08:55
Show Gist options
  • Save candale/be0e102484de523279406de9b1a9675b to your computer and use it in GitHub Desktop.
Save candale/be0e102484de523279406de9b1a9675b to your computer and use it in GitHub Desktop.
Forwarding from one interface to another (UFW)
# Place this in /etc/ufw/before.rules
*nat
-A PREROUTING -p tcp -s 10.10.0.0/24 --dport 7000 -j DNAT --to-destination 10.0.0.3:7000
-A PREROUTING -p tcp -s 10.10.0.0/24 --dport 9160 -j DNAT --to-destination 10.0.0.3:9160
-A PREROUTING -p tcp -s 10.10.0.0/24 --dport 9042 -j DNAT --to-destination 10.0.0.3:9042
COMMIT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment