auto eth0
iface eth0 inet static
address x.x.x.x (adres od ISP)
netmask x.x.x.x
gateway x.x.x.x
network x.x.x.x
auto eth1
iface eth1 inet static
address 192.168.25.1
netmask 255.255.255.0
# nano /etc/resolv.conf
nameserver x.x.x.x
nameserver x.x.x.x
/etc/init.d/networking restart
w konsoli wpisujemy:
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -s 192.168.25.0/24 -j MASQUERADE
iptables -A FORWARD -s 192.168.25.0/24 -j ACCEPT
konfiguracja linux'a z eth0
# nano /etc/network/interfaces
auto eth0
iface eth0 inet static
address 192.168.25.2
netmask 255.255.255.0
gateway 192.168.25.1
# nano /etc/resolv.conf
nameserver 194.204.159.1
nameserver 192.168.25.1
/etc/init.d/networking restart
Brak komentarzy:
Prześlij komentarz