Redes
De MochilaWiki
Revisão de 17h59min de 16 de setembro de 2009 por Banto Palmarino (discussão | contribs)
grafico:
apt-get install network-manager-kde adduser rosa powerdev adduser rosa netdev
na mão
# ifconfig eth0 192.168.0.10 netmask 255.255.255.0 # route add default 192.168.0.1 # echo "nameserver 200.204.0.10" > /etc/resolv.conf # echo "nameserver 200.204.0.138" >> /etc/resolv.conf
no iniciar
exemplo do /etc/network/interfaces
auto lo iface lo inet loopback
auto eth0 iface eth0 inet dhcp
auto eth1 iface eth1 inet static address 192.168.0.1 netmask 255.255.255.0 broadcast 192.168.0.255 gateway 192.168.0.1 network 192.168.0.0
compartilhando rede
considerando que a sua rede local seja: 192.168.0.0/24 (que significa a faixa de IPs de 192.168.0.1 até 192.168.0.254)
iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -j MASQUERADE echo "1" > /proc/sys/net/ipv4/ip_forward
Limpando as tabelas
iptables -F iptables -t nat -F iptables -t mangle -F
Servidor DHCP
# apt-get install dhcp3-server
editando conf
# nano /etc/dhcp3/dhcpd.conf
shared-network WORKSTATIONS { subnet 192.168.0.0 netmask 255.255.255.0 {
default-lease-time 21600; max-lease-time 21600;
option subnet-mask 255.255.255.0; option broadcast-address 192.168.0.255; option routers 192.168.0.1; option domain-name-servers 200.170.0.133, 200.155.255.20; option domain-name "banto.org.br"; range 192.168.0.2 192.168.0.11;
} }
- roteador linksys+uaifai
insira os seguintes valores na sua rede:
- IP: 192.168.1.10
- SUBNET MASK: 255.255.255.0
- GATEWAY: 192.168.1.1
e agora acesse via browse: http://192.168.1.1
verificando máquinas na rede