Skip to main content

Networking Bridge Ubuntu

To start, NAT is by far the easiest way to get your guests connected to the interweb, but you may want to use the guests as servers, for this you need Host Networking. You will need to install bridge-utils and uml-utilities so that you can make a tap device and add it to a bridge.

sudo apt-get install bridge-utils uml-utilities

Now make a bridge, and put your current interface into it:

sudo tunctl -t tap1 -u fred #where fred is the user you will be running vbox as
sudo chown root.vboxusers /dev/net/tun
sudo chmod g+rw /dev/net/tun

Set the permission to persist across reboots, by editing as root /etc/udev/rules.d/20-names.rules and changing:

KERNEL=="tun",                          NAME="net/%k"

to

KERNEL=="tun",                          NAME="net/%k",  GROUP="vboxusers",     MODE="0660"

Make a new bridge called br0:

sudo brctl addbr br0

Put your current interface (in this case eth0) into promiscuous mode, then add it to the bridge and give the bridge a dhcp address.

sudo ifconfig eth0 0.0.0.0 promisc
sudo brctl addif br0 eth0

If you are using DHCP to automatically get an IP address, set the bridge to use DHCP.

sudo dhclient br0

If you are using a static IP, specify the IP address, netmask and add the default gateway route

#Where 192.168.1.105 is your static IP and 255.255.0.0 is your netmask
sudo ifconfig br0 192.168.1.105 netmask 255.255.0.0

#Where 192.168.1.1 is your default gateway
sudo route add default gw 192.168.1.1 br0

Add the new tap1 device to the bridge and activate tap1 (the second line appears to be necessary according to [WWW] http://ubuntuforums.org/showthread.php?t=561461#3)

sudo brctl addif br0 tap1
sudo ifconfig tap1 up

You should now be able to use host networking in vbox, just change "attached to" to "host interface" and add the interface name of tap1 in your networking settings. Read the manual as well, there are some other nifty ways to do this. Do not forget to use the root account when doing this. Also reboot your computer afterwords.

Popular posts from this blog

Freenas Snapshots Replication Backup

Mungkin anda sudah mengetahui Freenas sebelumnya. Ya..Freenas adalah salah satu software NAS Storage berbasis FreeBSD. Karena kehandalannya, Freenas banyak digunakan sebagai NAS Storage di dunia IT. Saya pernah berfikir bagaimana jika Freenas yang kita gunakan mengalami masalah, crash misalnya. Mungkin jika hardisknya menggunakan RAID bisa tinggal ganti disknya. Bagaimana jika tidak ada RAID (hari gini Server gak ada Raid hdewww heee) atau hal lain yang membuat data tidak bisa digunakan di Freenas. Tutorial ini saya buat untuk berbagi ilmu kepada rekan2 sekalian. Saya akan coba membuat Replikasi Freenas. Dimana Dataset pada salah satu Freenas (Freenas A) akan di snapshot dan di replikasikan ke Freenas B Hal yang perlu disiapkan : 1.  Freenas A : 192.168.100.1 (Primary) Disk 8GB x 2 2.  Freenas B : 192.168.100.2 (Secondary) Disk 8GB x 2 SETING FREENAS A DAN B Kita akan buat raid mirror untuk 2 disk. Storage - Volume Manager   Volume Name :

Migrasi Nextcloud 19 ke Nextcloud 20.02 (Beda Server)

Server A : 192.168.0.1 (Server lama : Centos 7), port 80 Server B : 192.168.0.2 (Server baru : Centos 8), port 80 Nginx Load Balance : 192.168.0.10, port 443 untuk SSL Tahapan : 1. Upgrade Nextcloud 19.0.3 ke 19.0.5 (server lama) 2. Instalasi server baru (Centos 8) 3. Backup dan restore data nextcloud dan databas ke server baru 4. Konfigurasi Nextcloud di server baru dan Nginx Server 5. Finish A. Upgrade Nextcloud 19.0.3 ke 19.0.5 Untuk Upgrade 19.0.3 ke 20.0.2 tidak dapat dijalankan secara langsung. Harus bertahap upgrade ke versi minor. 19.0.3 -> 19.0.5 secara otomais. Dan upgrade ke 20.0.2 secara manual. 1. Login ke Nextcloud 2. Setting - Administration-Overview 3. Versi yang tersedia 19.0.5 5. Pilih Open updater  4. Start Update 5.  Pilih No (for usage of the web based updater), untuk mode maintenance dan upgrade via console. 6. Masuk ke console dan ke directory /var/www/html/nextcloud 7. Jalankan $ sudo   - u  apache   php occ upgrade 8. Maintenance mode masih dalam keadaan

Zimbra Error Subject : ***UNCHECKED***

Beberapa hari yang lalu Subject email Zimbra selalu di tambahkan tulisan ***UNCHECKED***. Padahal tidak ada perubahan konfigurasi mail server sebelumnya. Cari di google ada beberapa referensi yaitu merubah file /opt/zimbra/. Tahapan : #su root #cd /opt/zimbra/amavisd/bin #cp -pa amavisd amavid.org #vi amavisd Rubah isi file di baris : #su zimbra $undecipherable_subject_tag = '***UNCHECKED*** '; menjadi $undecipherable_subject_tag = '';   $zmamavisdctl restart Di hari berikutnya saya coba cek kembali utilisasi mail dengan 'top'. Terilhat penggunaan clamd sebesar 100%. Coba dicek di log /var/log/zimbra.log |grep clamd hasilnya mail amavis[26778]: (26778-07) ClamAV-clamd: All attempts (1) failed connecting to /opt/zimbra/data/clamav/clamav.sock, retrying (1) Oct 24 10:10:43 mail amavis[26778]: (26778-07) (!)connect to /opt/zimbra/data/clamav/clamav.sock failed, attempt #1: Can't connect to UNIX socket /opt/zimbra/data/clamav/clamav.sock: Co