Guest User

Untitled

a guest
Jul 16th, 2023
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. XML VM nic snippet:
  2. <interface type="bridge">
  3. <mac address="52:54:00:ab:0b:e9"/>
  4. <source bridge="br0"/>
  5. <target dev="vnet0"/>
  6. <model type="virtio"/>
  7. <filterref filter="local-fileserver-only"/>
  8. <alias name="net0"/>
  9. <address type="pci" domain="0x0000" bus="0x01" slot="0x00" function="0x0"/>
  10. </interface>
  11.  
  12.  
  13. Network filter definition:
  14.  
  15. <filter name='local-fileserver-only' chain='ipv4' priority='-700'>
  16. <uuid>fce8ae33-e69e-83bf-262e-30786c1f8072</uuid>
  17.  
  18. <!-- Reference the clean traffic filter to prevent MAC, IP and ARP spoofing.
  19. By not providing and IP address parameter, libvirt will detect the IP address the VM is using. -->
  20. <filterref filter='clean-traffic'/>
  21.  
  22. <!-- Allow VM to access single ip for samba -->
  23. <rule action='accept' direction='out' priority='500'>
  24. <tcp dstipaddr='192.168.1.202' dstportstart='445'/>
  25. </rule>
  26.  
  27. <!-- Drop all other traffic -->
  28. <rule action='drop' direction='inout' priority='501'>
  29. <all/>
  30. </rule>
  31.  
  32. </filter>
Advertisement
Add Comment
Please, Sign In to add comment