Skip to content

Instantly share code, notes, and snippets.

@crazybolillo
Created June 19, 2024 15:28
Show Gist options
  • Save crazybolillo/f9a6eeffe04f0a4120c59a8855c9781e to your computer and use it in GitHub Desktop.
Save crazybolillo/f9a6eeffe04f0a4120c59a8855c9781e to your computer and use it in GitHub Desktop.
Enable internet access for Vagrant VMs
#!/bin/sh
iptables -A FORWARD -i virbr1 -o wlp4s0 -j ACCEPT
iptables -A FORWARD -i wlp4s0 -o virbr1 -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -t nat -A POSTROUTING -o virbr1 -j MASQUERADE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment