Use at command for setting IP Tunnel

Discussions related to using VirtualBox on Linux hosts.
Post Reply
cedenburn
Posts: 1
Joined: 16. Nov 2007, 05:01

Use at command for setting IP Tunnel

Post by cedenburn »

Hello, I found this to work very well.
First do this:

Code: Select all

sudo apt-get install uml-utilities bridge-utils
Then sudo gedit /etc/rc.local to add this at command:

Code: Select all

at -f /home/USERID/test now
test is a file with the following contents:

Code: Select all

tunctl -t tap1 -u USERID
tunctl -t tap2 -u USERID    
brctl addbr br0
ifconfig eth0 0.0.0.0 promisc
brctl addif br0 eth0
dhclient br0
brctl addif br0 tap1
brctl addif br0 tap2
ifconfig tap1 up
ifconfig tap2 up
sudo chmod 0666 /dev/net/tun
I use this to put two VM on host network, if you need more just add tap3, tap4 etc.

Enjoy
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Post by Sasquatch »

Your point being? If you use the command VBoxAddIF you can create a virtual interface too for your virtual machine.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Post Reply