Skip to content

Instantly share code, notes, and snippets.

@samvv
Created December 3, 2025 20:15
Show Gist options
  • Select an option

  • Save samvv/5df0694a858cc3bc2aec932ec60a2bf7 to your computer and use it in GitHub Desktop.

Select an option

Save samvv/5df0694a858cc3bc2aec932ec60a2bf7 to your computer and use it in GitHub Desktop.
Block access to private networks on a machine using libvirt
<filter name='no-private-networks'>
<rule action='drop' direction='out'>
<tcp dstipaddr='10.0.0.0' dstipmask='8' />
</rule>
<rule action='drop' direction='out'>
<tcp dstipaddr='172.16.0.0' dstipmask='12' />
</rule>
<rule action='drop' direction='out'>
<tcp dstipaddr='192.168.0.0' dstipmask='16' />
</rule>
</filter>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment