SHARE
TWEET

Untitled

a guest Dec 13th, 2018 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ip link add br0 type bridge
  2. ip addr add 192.168.122.1/24 dev br0
  3. ip link set br0 up
  4.  
  5. ip tuntap add mode tap tap0
  6. ip link set tap0 master br0
  7. ip link set tap0 up             // tap1 as well
  8.    
  9. qemu-system-x86_64 -enable-kvm -m 1G
  10. -cdrom archlinux-2018.12.01-x86_64.iso
  11. -drive file=vm.raw,format=raw,id=hd0
  12. -device virtio-net,netdev=network0
  13. -netdev tap,id=network0,ifname=tap0,script=no,downscript=no
  14. -device virtio-net,netdev=network1
  15. -netdev user,id=network1
  16.    
  17. iptables -A FORWARD -i br0 -o br0 -j ACCEPT
  18. iptables -t nat -A POSTROUTING -s 192.168.122.0/24 -j MASQUERADE
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top