Witam.
Stwierdziłem, ze dziś zrobię tą sieć.
Użyłem tego poradnika:
I niby wszystko było dobrze do czasu końcowego uruchomienia:
Kod: Zaznacz cały
Kamil:/home/kamil# /etc/init.d/firewall
bash: /etc/init.d/firewall: cannot execute binary file
Moją kartę potraktowałem jako eth0 (chyba dobrze).
Teraz konkrety:
Kod: Zaznacz cały
Kamil:/home/kamil# cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
auto eth0
iface eth1 inet static
address 10.0.0.1
netmask 255.255.255.0
Kod: Zaznacz cały
Kamil:/home/kamil# cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
auto eth0
iface eth1 inet static
address 10.0.0.1
netmask 255.255.255.0
Kamil:/home/kamil# cat /etc/dhcp3/dhcpd.conf
subnet 10.0.0.0 netmask 255.255.255.0 {
range 10.0.0.3 10.0.0.254]
I też w powyższym pliku miałem dylemat bo musiałem wprowadzić moją domenę, a jest ona taka: mój-adres-ip.adsl.netia.pl
[code]Kamil:/home/kamil# cat /etc/default/dhcp3-server
# Defaults for dhcp initscript
# sourced by /etc/init.d/dhcp
# installed at /etc/default/dhcp3-server by the maintainer scripts
#
# This is a POSIX shell fragment
#
# On what interfaces should the DHCP server (dhcpd) serve DHCP requests?
# Separate multiple interfaces with spaces, e.g. "eth0 eth1".
INTERFACES="eth0"
Kamil:/home/kamil#
Kod: Zaznacz cały
Kamil:/home/kamil# cat /etc/init.d/firewall
#linijka potrzebna do włączenia udostępniania internetu
echo 1 > /proc/sys/net/ipv4/ip_forward
#wyczyszczenie starych reguł z pamięci iptables
iptables -F
iptables -X
iptables -t nat -X
iptables -t nat -F
# ustawienie domyślnej polityki (o tym później)
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
iptables -A INPUT -i lo -j ACCEPT
iptables -A FORWARD -o lo -j ACCEPT
# Najważniejsze - udostępnienie sieci dla wybranych podsieci
iptables -t nat -A POSTROUTING -s 10.0.0.0/24 -j MASQUERADE
iptables -t nat -A POSTROUTING -s 10.0.1.0/24 -j MASQUERADE
iptables -t nat -A POSTROUTING -s 10.0.2.0/24 -j MASQUERADE
Kamil:/home/kamil#
I teraz czekam, aż ktoś wyciągnie mi mój błąd i sieć zacznie działać, bo już nie mam nerwów na brak dostępu do internetu w drugim komputerze i to jest powód uruchamiania Windowsa.
Pozdrawiam.