ubuntu Linux settings tips
1. after cloning the virtualbox vdi, network if names could change
"vboxmanage clonevdi src.vdi dest.vdi"
this is due to the change of MAC, in order to map the right MAC to if
name "eth0,eth1,...", need to edit
"/etc/udev/rules.d/70-persistent-net.rules"
For example: notice the address (MAC) and Name (eth0,eth1...)
----------------------------------------
backup: /etc/udev/rules.d/z25_persistent-net.rules
delete all of your interfaces in that file.
this is mines as an example:
# This file was automatically generated by the /lib/udev/write_net_rules
# program, probably run by the persistent-net-generator.rules rules
file.
#
# You can modify it, as long as you keep each rule on a single line.
# MAC addresses must be written in lowercase.
# DELETE ALL OF THE BELOW, THEY SHOULD GET RECREATED
# AT NEXT BOOT
# YOU CAN EVEN PHYSICALLY REMOVE THE NICS
# ADD 1, REBOOT, ADD NEXT, ETC.
# PCI device 0x1039:0x0900 (sis900)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:11:5b:c3:48:4f",
NAME="eth1"
# Firewire device 00000ae6ff2c920d (ohci1394)
SUBSYSTEM=="net", DRIVERS=="?*",
ATTRS{address}=="00:00:0a:e6:ff:2c:92:0d", NAME="eth0"
# PCI device 0x1524:0x1410 (orinoco_cs)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:02:2d:ac:ca:69",
NAME="eth2"
# PCI device 0x10ec:0x8180 (rtl8180)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:0c:41:76:e1:4f",
ATTRS{type}=="1", NAME="wlan0"
# Firewire device 0000000000000000 (ohci1394)
SUBSYSTEM=="net", DRIVERS=="?*",
ATTRS{address}=="00:00:00:00:00:00:00:00", NAME="eth3"
---------------------------------------------------------
2. add two NIC adapters to VM, one NAT, the other internal networking
NAT can be used to communicate with Internet, while internal networking
could be assign an arbitrary IP address for internal communication
(tested:after reboot, ifconfig will show 10.0.2.25 for NAT and
196.254.0.1x for intNet),see also
http://forums.virtualbox.org/viewtopic.php?t=4375&sid=8f85bfa96e26f415bdb38e7e0599f96c
/etc/network/interfaces file, and have made it this:
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface for NAT
auto eth0
iface eth0 inet dhcp
# The secondary network interface for internal network
auto eth1
iface eth1 inet static
address 196.254.0.10 (11,12,...)
netmask 255.255.255.0
broadcast 196.254.0.255
network 196.254.0.0
gateway 196.254.0.0.1
3. Disable IPv6 (http://ubuntuforums.org/archive/index.php/t-6841.html)
a. sudo gedit /etc/modprobe.d/aliases (or your preferred text editor)
b. Find the line: alias net-pf-10 ipv6
c. Edit this to: alias net-pf-10 off
d. Save the file and reboot
also in firefox
Additional: Disabling ipv6 in Firefox
Type about:config in your address entry bar (in firefox)
Type "ipv6" in the filter
Change the value of "network.dns.disableIPv6" to true
4. virtual box shared folder name can not with a leading capital
character for example , share name "Share" won't work but "share" will
5. file sharing in Linux without sharedfolder in virtualbox
http://www.virtualbox.org/wiki/Sharing_files_on_OSE
a. NFS
(http://www.ubuntugeek.com/nfs-server-and-client-configuration-in-ubuntu.html)
b. CIFS/SAMBA (https://help.ubuntu.com/community/SettingUpSamba)
c. SSHSF (http://en.wikipedia.org/wiki/SSHFS)