Enviado em 06/08/2014 - 23:03h
Boa noite galera estou com essas configurações em meu servidor, porem eu não consigo liberar a internet e meu servidor não libera IP automaticamente! Será que alguém poderia me ajudar!
sudo vim /etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
auto eth1
iface eth1 inet static
address 10.0.0.1
netmask 255.255.0.0
network 10.0.0.0
broadcast 10.0.255.255
###############
$ sudo vim /etc/sysctl.conf
net.ipv4.ip_forward=1
###############
$ sudo vim /etc/init.d/internet
#!/bin/bash
iniciar(){
modprobe iptable_nat
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
}
parar(){
iptables -F -t nat
}
case "$1" in
"start") iniciar ;;
"stop") parar ;;
"restart") parar; iniciar ;;
*) echo "Use os parâmetros start ou stop"
esac
###############
$ sudo vim /etc/dhcp/dhcpd.conf
ddns-update-style none;
option domain-name "ubuntu";
option domain-name-servers 8.8.4.4, 8.8.8.8.8;
default-lease-time 600;
max-lease-time 7200;
authoritative;
log-facility local7;
subnet 10.0.0.0 netmask 255.255.0.0 {
range 10.0.0.2 10.0.255.255;
option routers 10.0.0.1;
option broadcast-address 10.0.255.255;
}
##################
$ sudo vim /etc/default/isc-dhcp-server
INTERFACES="eth1
##################
sudo vim /etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
auto eth1
iface eth1 inet static
address 10.0.0.1
netmask 255.255.0.0
network 10.0.0.0
broadcast 10.0.255.255
###############
$ sudo vim /etc/sysctl.conf
net.ipv4.ip_forward=1
###############
$ sudo vim /etc/init.d/internet
#!/bin/bash
iniciar(){
modprobe iptable_nat
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
}
parar(){
iptables -F -t nat
}
case "$1" in
"start") iniciar ;;
"stop") parar ;;
"restart") parar; iniciar ;;
*) echo "Use os parâmetros start ou stop"
esac
###############
$ sudo vim /etc/dhcp/dhcpd.conf
ddns-update-style none;
option domain-name "ubuntu";
option domain-name-servers 8.8.4.4, 8.8.8.8.8;
default-lease-time 600;
max-lease-time 7200;
authoritative;
log-facility local7;
subnet 10.0.0.0 netmask 255.255.0.0 {
range 10.0.0.2 10.0.255.255;
option routers 10.0.0.1;
option broadcast-address 10.0.255.255;
}
##################
$ sudo vim /etc/default/isc-dhcp-server
INTERFACES="eth1
##################