Difference between revisions of "VirtualBox dengan Bridged Host Interface Permanen"
Jump to navigation
Jump to search
Onnowpurbo (talk | contribs) |
Onnowpurbo (talk | contribs) (Undo revision 3861 by Onnowpurbo (Talk)) |
||
Line 10: | Line 10: | ||
# vi /etc/network/interfaces | # vi /etc/network/interfaces | ||
+ | |||
+ | Isi informasi berikut, | ||
+ | |||
+ | auto tap0 | ||
+ | iface tap0 inet manual | ||
+ | up ifconfig $IFACE 0.0.0.0 up | ||
+ | down ifconfig $IFACE down | ||
+ | tunctl_user <yourusername> | ||
+ | |||
+ | auto br0 | ||
+ | iface br0 inet dhcp | ||
+ | bridge_ports all tap0 | ||
+ | |||
+ | Tambahkan Interface | ||
+ | |||
+ | # /sbin/ifup tap0 | ||
+ | # /sbin/ifup br0 | ||
+ | |||
+ | |||
+ | Reboot PC anda | ||
+ | |||
+ | # shutdown -r now | ||
+ | |||
+ | |||
+ | Cara lain yang tidak permanen & akan hilang sesudah booting | ||
+ | |||
+ | # tunctl -t tap0 -u <yourusername> | ||
+ | # chown root.vboxusers /dev/net/tun | ||
+ | # chmod g+rw /dev/net/tun | ||
+ | |||
Edit /etc/udev/rules.d/20-names.rules | Edit /etc/udev/rules.d/20-names.rules | ||
Line 22: | Line 52: | ||
KERNEL=="tun", NAME="net/%k", GROUP="vboxusers", MODE="0660" | KERNEL=="tun", NAME="net/%k", GROUP="vboxusers", MODE="0660" | ||
+ | Buat bridge baru | ||
+ | |||
+ | # brctl addbr br0 | ||
+ | |||
+ | Masukan eth0 agar masuk ke bridge | ||
+ | |||
+ | # ifconfig eth0 0.0.0.0 promisc | ||
+ | # brctl addif br0 eth0 | ||
+ | # dhclient br0 | ||
+ | |||
+ | Masukan tap0 agar masuk ke bridge | ||
+ | |||
+ | # brctl addif br0 tap0 | ||
+ | # ifconfig tap0 up | ||
Beritahu VirtualBox Host Interface '''tap0''' Yang digunakan | Beritahu VirtualBox Host Interface '''tap0''' Yang digunakan |
Revision as of 16:21, 1 May 2008
Install Aplikasi Pendukung
# apt-get install uml-utilities bridge-utils
Tambahkan Username Anda
# adduser <yourusername> uml-net
Tambahkan ke file /etc/network/interfaces
# vi /etc/network/interfaces
Isi informasi berikut,
auto tap0 iface tap0 inet manual up ifconfig $IFACE 0.0.0.0 up down ifconfig $IFACE down tunctl_user <yourusername>
auto br0 iface br0 inet dhcp bridge_ports all tap0
Tambahkan Interface
# /sbin/ifup tap0 # /sbin/ifup br0
Reboot PC anda
# shutdown -r now
Cara lain yang tidak permanen & akan hilang sesudah booting
# tunctl -t tap0 -u <yourusername> # chown root.vboxusers /dev/net/tun # chmod g+rw /dev/net/tun
Edit /etc/udev/rules.d/20-names.rules
# vi /etc/udev/rules.d/20-names.rules
Ubah
KERNEL=="tun", NAME="net/%k"
Menjadi
KERNEL=="tun", NAME="net/%k", GROUP="vboxusers", MODE="0660"
Buat bridge baru
# brctl addbr br0
Masukan eth0 agar masuk ke bridge
# ifconfig eth0 0.0.0.0 promisc # brctl addif br0 eth0 # dhclient br0
Masukan tap0 agar masuk ke bridge
# brctl addif br0 tap0 # ifconfig tap0 up
Beritahu VirtualBox Host Interface tap0 Yang digunakan
Selesai Sudah ..
Mesin Ubuntu yang kita gunakan akan mempunyai tiga (3) interface,
- tap0 - virtual milik mesin di virtualbox
- br0 - bridge yang akan bicara ke interface yang benar
- eth0 - interface awal di mesin host.