jedna se o sit A.B.2.0/26
- router, ktrery spaja se svetem A.B.2.2, dns nastavena lokalni + poskytovatele
- za nim jsou 2 web servry: A.B.2.21 a A.B.2.22 a DNS A.B.2.10
- dns server mydns
- kazdy stroj ma verejnou IP z na rozsahu C.
- cat /proc/sys/net/ipv4/ip_forward je na 1
firewall:
#Vymazani FRONT
iptables -F INPUT
iptables -F FORWARD
iptables -F OUTPUT
#DEFAULT POLICY
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT ACCEPT
#ROUTER
iptables -A INPUT -p all -s localhost -j ACCEPT
iptables -A INPUT -p icmp -d A.B.2.0 -j ACCEPT
iptables -A INPUT -m state --state ESTABLISHED,RELATED --j ACCEPT
#smer ven
iptables -A FORWARD -p all -s A.B.2.0/26 -j ACCEPT #primar
#ICMP to X.X.X.X/aa
iptables -A FORWARD -p icmp -d A.B.2.0/26 -j ACCEPT
iptables -A FORWARD -p icmp -s A.B.2.0/26 -j ACCEPT
#dns
iptables -A FORWARD -p tcp -d A.B.2.10 --dport 53 -j ACCEPT
iptables -A FORWARD -p udp -d A.B.2.10 --dport 53 -j ACCEPT
#webstroj1
iptables -A FORWARD -p tcp -d A.B.2.21 --dport 80 -j ACCEPT #http
iptables -A FORWARD -p tcp -d A.B.2.21 --dport 8080 -j ACCEPT #http
iptables -A FORWARD -p tcp -d A.B.2.21 --dport 443 -j ACCEPT #https
iptables -A FORWARD -p tcp -d A.B.2.21 --dport 21 -j ACCEPT #ftp
iptables -A FORWARD -p tcp -d A.B.2.21 --dport 20 -j ACCEPT #ftp
iptables -A FORWARD -p tcp -d A.B.2.21 --dport 3306 -j ACCEPT #mysql
dtto pro webserver2 samozrejme s jinyma IP.
Bohuzel na me vysel spravit router, a priznam se, fakt nejsu doma v tychto vecech, takze varim z vody.
ping z venku, tak ze site jede korektne