Skip to content

Instantly share code, notes, and snippets.

@fredericoramos
Created February 27, 2013 16:55
Show Gist options
  • Save fredericoramos/5049494 to your computer and use it in GitHub Desktop.
Save fredericoramos/5049494 to your computer and use it in GitHub Desktop.
UBUNTU - Configurando IP Fixo / Setup Fixed IP
==========================================================
UBUNTU - Configurando IP Fixo
UBUNTU - Setup Fixed IP
==========================================================
####
#### Atenção:
#### Se estiver clonando a Máquina Virtual em outra máquina,
#### talvez seja necessário força a mudança do MAC Address
####
#### Atention:
#### If you're cloning a Virtual Machine to another PC,
#### maybe will be necessary change de MAC Address
####
#### VMWare -> Select the Virtual Machine -> Settings -> Hardware -> Network Adapter -> Advanced -> MAC Address -> Generate
####
# Instalar ferramenta de monitoração de rede
# Install network monitor tool
sudo apt-get install pvm-dev
# Instalar ferramenta para monitorar dispositivos
# Install device monitor tool
sudo apt-get install wodim
# Google DNS (only to know)
DNS1: 8.8.8.8
DNS2: 8.8.4.4
#
# Alterar as configurações da Interface.
# Change interface configuration
#
sudo vim /etc/network/interfaces
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
# Configurar a placa de rede eth0 para IP estático
# Set eth0 to static ip
iface eth0 inet static
# Meu IP Virtual da minha Máquina Virtual, entregue pelo meu VMWare ou VMBox
# My Virtual IP of my Virtual Machine, delivery by my VMWare or VMBox
address 192.168.217.10
netmask 255.255.255.0
network 192.168.217.0
broadcast 192.168.217.255
# Meu Gateway é a minha placa de rede "VMware Network Adapter VMnet1" (dentro do meu PC Principal - entro do Windows, por exemplo)
# My Gateway is my "VMware Network Adapter VMnet1" (into my primary pc - into Windows OS, for example)
gateway 192.18.217.2
# Eu costumo utiliar o DNS do Google
# I usually put the Google DNS
dns-nameservers 8.8.8.8 8.8.4.4
dns-search domain.local
# Editar o aquivo de resolução de nomes
# Edit the resolv name file
sudo vi /etc/resolv.conf
# search meuservidor.com.br myserver.com coisa1.com.br thing1.com
nameserver 8.8.8.8
nameserver 8.8.4.4
# Reiniciar a rede
# Restart network
sudo /etc/init.d/networking restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment