Guest User

Untitled

a guest
Feb 19th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.62 KB | None | 0 0
  1. $ cat /etc/hostname.vether0
  2. inet 172.16.1.5 255.255.255.0
  3.  
  4. --------------------------------------------
  5. $ cat /etc/hostname.bridge0
  6. add vether0
  7.  
  8. --------------------------------------------
  9. $ doas cat /etc/dhcpd.conf
  10. # Local VM Subnet
  11. subnet 172.16.1.0 netmask 255.255.255.0 {
  12. option domain-name "vmm.openbsd.local";
  13. option domain-name-servers 8.8.8.8, 8.8.4.4;
  14. option routers 172.16.1.5;
  15. range 172.16.1.100 172.16.1.200;
  16. }
  17. #Alpine
  18. host static-client {
  19. hardware ethernet fe:e1:bb:d1:b0:f7;
  20. fixed-address 172.16.1.104;
  21. }
  22.  
  23. --------------------------------------------
  24. $ cat /etc/vm.conf
  25. switch "local" {
  26. interface bridge0
  27. }
  28.  
  29. --------------------------------------------
  30. doas cat /etc/pf.conf
  31. # $OpenBSD: pf.conf,v 1.55 2017/12/03 20:40:04 sthen Exp $
  32. #
  33. # See pf.conf(5) and /etc/examples/pf.conf
  34.  
  35. #original config
  36. set skip on lo
  37. block return # block stateless traffic
  38. pass # establish keep-state
  39.  
  40. # By default, do not permit remote connections to X11
  41. block return in on ! lo0 proto tcp to port 6000:6010
  42.  
  43. # Port build user does not need network
  44. block return out log proto {tcp udp} user _pbuild
  45. #/original
  46.  
  47. # VMM
  48. ext_if="eth0"
  49. vmd_if="{ vether0 bridge0 }"
  50.  
  51. set block-policy drop
  52. set loginterface egress
  53. match in all scrub (no-df random-id max-mss 1440)
  54. match out on egress inet from !(egress:network) to any nat-to (egress:0)
  55. pass out quick inet
  56. pass in on $vmd_if inet
  57. pass in on egress inet proto tcp from any to (egress) port 22
  58.  
  59. #match out on $ext_if from $vmd_if:network to any nat-to ($ext_if)
  60. #/VMM
Add Comment
Please, Sign In to add comment