Proszę o podpowiedź co dalej jak ustawić eth0 i eth1 jak apache2 jak to wszystko ogarnąć aby było jak na obrazku powyżej

Z góry dzięki za podpowiedzi i pomoc.
Z poważaniem fanatyk linuxa

iptables:#127.0.0.1
auto lo
iface lo inet loopback
#LAN (linksys) -tu jest net
auto eth0
iface eth0 inet static
address 192.168.1.2
netmask 255.255.255.0
network 192.168.1.0
gateway 192.168.1.1
#WAN (Tp-link) - tu chce mieć neta
auto eth1
iface eth1 inet static
address 192.168.2.2
netmask 255.255.255.0
network 192.168.2.0
geteway 192.168.1.2
firewal z prawami chmoad +x i dodany do update-rc.d firewall defaults 20#!/bin/bash
# wlaczenie w kernelu forwardowania
echo 1 > /proc/sys/net/ipv4/ip_forward
#deklaracja zmiennych
IPTABLES=/sbin/iptables #ścieżka do iptables
NO_ROUTING=1 #czy forwardować pakiety?
#dla poniższych argumentów 1 udostępnia usługę,
#każda inna wartość zabrania do niej dostępu
OPEN_FTP=0 #czy udostępnić usługę FTP
OPEN_SSH=0 #czy udostępnić usługę SSH
OPEN_HTTP=1 #czy udostępnić usługę HTTP
#czyścimy tablicę z poprzednich reguł
$IPTABLES -F
#ustawiamy domyślną politykę
$IPTABLES -P INPUT DROP
if [ "$NO_ROUTING" = "1" ]; then
$IPTABLES -P FORWARD DROP
fi
if [ "$OPEN_FTP" = "1" ]; then
$IPTABLES -A INPUT --protocol tcp --destination-port 21 -j ACCEPT
fi
if [ "$OPEN_SSH" = "1" ]; then
$IPTABLES -A INPUT --protocol tcp --destination-port 22 -j ACCEPT
fi
if [ "$OPEN_HTTP" = "1" ]; then
$IPTABLES -A INPUT --protocol tcp --destination-port 80 -j ACCEPT
$IPTABLES -A INPUT --protocol tcp --destination-port 81 -j ACCEPT
fi
#otwieramy jeszcze drogę powrotną pakietom FTP, HTTP, SSH ...
$IPTABLES -A INPUT --protocol tcp --source-port 21 -j ACCEPT
$IPTABLES -A INPUT --protocol tcp --source-port 80 -j ACCEPT
$IPTABLES -A INPUT --protocol tcp --source-port 81 -j ACCEPT
$IPTABLES -A INPUT --protocol tcp --source-port 8080 -j ACCEPT
$IPTABLES -A INPUT --protocol tcp --source-port 22 -j ACCEPT
#koniecznie otwórzmy drogę do DNS-a
$IPTABLES -A INPUT --protocol udp --source-port 53 -j ACCEPT
#i komunikatorowi gg
$IPTABLES -A INPUT --protocol tcp --source-port 8074 -j ACCEPT
#ssh dla ip
$IPTABLES -A INPUT -s 0/0 -d 192.168.2.2 -p tcp --dport 22 -j ACCEPT
$IPTABLES -A OUTPUT -s 0/0 -d 192.168.2.2 -p tcp --dport 22 -j ACCEPT
$IPTABLES -A INPUT -s 0/0 -d 192.168.2.2 -p udp --dport 22 -j ACCEPT
$IPTABLES -A OUTPUT -s 0/0 -d 192.168.2.2 -p udp --dport 22 -j ACCEPT
$IPTABLES -A INPUT -s 0/0 -d 192.168.1.2 -p tcp --dport 22 -j ACCEPT
$IPTABLES -A OUTPUT -s 0/0 -d 192.168.1.2 -p tcp --dport 22 -j ACCEPT
$IPTABLES -A INPUT -s 0/0 -d 192.168.1.2 -p udp --dport 22 -j ACCEPT
$IPTABLES -A OUTPUT -s 0/0 -d 192.168.1.2 -p udp --dport 22 -j ACCEPT
# polaczenia nawiazane
$IPTABLES -A INPUT -j ACCEPT -m state --state ESTABLISHED,RELATED
$IPTABLES -A FORWARD -j ACCEPT -m state --state ESTABLISHED,RELATED
$IPTABLES -A OUTPUT -j ACCEPT -m state --state ESTABLISHED,RELATED
# udostepniaie internetu w sieci lokalnej
$IPTABLES -t nat -A POSTROUTING -s 192.168.2.0/24 -j MASQUERADE
$IPTABLES -A FORWARD -s 192.168.2.0/24 -j ACCEPT
dns-y ustawione: (resolv.conf)>> ping google.pl
PING google.pl (173.194.70.94) 56(84) bytes of data.
64 bytes from fa-in-f94.1e100.net (173.194.70.94): icmp_req=1 ttl=50 time=61.7 ms
64 bytes from fa-in-f94.1e100.net (173.194.70.94): icmp_req=2 ttl=50 time=67.2 ms
64 bytes from fa-in-f94.1e100.net (173.194.70.94): icmp_req=3 ttl=50 time=61.7 ms
64 bytes from fa-in-f94.1e100.net (173.194.70.94): icmp_req=4 ttl=50 time=67.6 ms
64 bytes from fa-in-f94.1e100.net (173.194.70.94): icmp_req=5 ttl=50 time=60.7 ms
64 bytes from fa-in-f94.1e100.net (173.194.70.94): icmp_req=6 ttl=50 time=80.1 ms
--- google.pl ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5008ms
rtt min/avg/max/mdev = 60.725/66.544/80.129/6.673 ms
I pytanie co robię nie tak ? Przekopałem większość poradników i tutoriali i jak nie mam netu na tp-link tak nie mam.nameserver 194.204.152.34
nameserver 194.204.159.1
Kod: Zaznacz cały
#127.0.0.1
auto lo
iface lo inet loopback
#WAN (linksys) -tu jest net
auto eth0
iface eth0 inet static
address 192.168.1.2
netmask 255.255.255.0
network 192.168.1.0
gateway 192.168.1.1
#LAN(Tp-link) - tu chce mieć neta
auto eth1
iface eth1 inet static
address 192.168.2.1
netmask 255.255.255.0
network 192.168.2.0
Kod: Zaznacz cały
# route -n