• Revista PROGRAMAR: Já está disponível a edição #53 da revista programar. Faz já o download aqui!

Sign in to follow this  
Followers 0

Problema a editar o rc.local

1 post in this topic


Queria editar o rc.local de modo a que ele cria-se uma bridge automaticamente, estou a seguir este tutorial, mas sempre que inicio o computador a bridge nao ta feita e tenho que a fazer manualmente...

Este é o meu rc.local

#!/bin/sh -e
# rc.local
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
# In order to enable or disable this script just change the execution
# bits.
# By default this script does nothing.

# For Network Bridging/TAP to enable Virtual Box 

# Set permissions of tun device 
chown root:vboxusers /dev/net/tun
chmod g+rw /dev/net/tun

#Add a bridge, add eth0 brctl addbr br0 
ifconfig eth0 promisc
brctl addif br0 eth0
dhclient br0 

# Create tap1 tunctl -t 
tap1 -u tiago # Be sure to change "user_name" to your actual user

# Enable tap1
brctl addif br0 tap1
ifconfig tap1 up

# Create tap2
tunctl -t tap2 -u tiago #Be sure to change user_name to your user name

# Enable tap2
brctl addif br0 tap2
ifconfig tap2 up

# Add additional tap devices as needed

exit 0

Desde ja agradecido;)


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
Followers 0