HOME
TIP & TECH
TIP & TECH
ubuntu 에서 VirtualBox 의 bridge mode 를 위해 tap0 를 bridge 로 세팅하는법 |
onionmixer 2017-11-01 18:49:08 2580 |
---|---|
1. uml-utilities, bridge-utils, resolvconf 를 설치한다
2. nm-connection-editor 를 통해서 원하는 랜카드의 IP 를 모두 제거한다 3. /etc/systemd/system/tapstart.service 를 다음의 내용으로 만든다 ===================== [Unit] Description=tap virtual network device startup [Service] ExecStart=/bin/ip tuntap add dev tap0 mode tap [Install] WantedBy=multi-user.target ===================== 이렇게 파일을 생성한 이후, 다음의 명령어와 과정을 거쳐서 제대로 작동하는지를 확인한다 ===================== systemctl enable tapstart.service systemctl start tapstart.service systemctl status tapstart.service root@coreonion:/etc/systemd/system# ip a | grep tap0 4: tap0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master br0 state UP group default qlen 1000 ===================== tap0 가 정상적으로 올라왔는지를 확인할 수 있다. 4. systemd-resolved 꺼버려야 한다. ===================== systemctl disable systemd-resolved.service service systemd-resolved stop ===================== 위의 과정을 통해서 systemd-resolved 서비스를 내린다 5. resolv.conf 의 잘못된 링크를 지운다 ===================== rm -rf /etc/resolv.conf ===================== 6. /etc/network/interfaces 에 다음의 내용을 "추가"한다 ===================== # The local network bridge auto br0 iface br0 inet static bridge_ports enp1s0f0 tap0 bridge_stp off bridge_fd 0 bridge_maxwait 0 address 192.168.1.16 netmask 255.255.255.0 gateway 192.168.1.1 ===================== 브릿지에 dhcp 를 할당하려는 경우라면 인터넷을 참고해서 다른 값을 넣어야 한다. 7. /etc/resolvconf/resolv.conf.d/tail 에 다음의 내용을 넣는다 ===================== nameserver 8.8.4.4 nameserver 8.8.8.8 ===================== 8. 재부팅해서 다음의 내용을 확인한다. %%%%%%%%%%%%%%%%%%%%% 1. ping 8.8.8.8 2. ip a | grep tap0 3. ip a | grep br0 4. nslookup naver.com %%%%%%%%%%%%%%%%%%%%%% tap0 와 br0 가 있고 인터넷이 되며 원하는 domain 을 lookup 할 수 있으면 성공. 이후에 VirtualBox 에서 tap0 를 network 으로 잡고 bridge mode 로 사용하면 된다. |
Previous | wayland 에서 griffiin powermate(USB) 를 사용하려 할때... |
---|---|
Next | ubuntu 중에서 systemd 를 사용할때.. dns 정보가 변하는 경우 |
댓글 0개