Czy takie reguły mogą nadawać się na firewalla?
ad.2 jak przekierować zapytania do swojego dns ? (nie każdy może chcieć używać mojego DNS), także czy można przekierować 80,443 do proxy firmowego?
#!/bin/bash
iptables -A OUTPUT -p tcp --dport 80 -j ACCEPT
iptables -A OUTPUT -p tcp --dport 443 -j ACCEPT
iptables -A OUTPUT -p tcp --dport 8080 -d 192.168.0.2 // proxy firmowe
iptables -A OUTPUT -p tcp --dport 9050 -d 192.168.0.2 // proxy firmowe
iptables -A OUTPUT -p tcp --dport 22 -s 192.168.* // ssh
iptables -A INPUT -p tcp --sport 22 -s 192.168.* // ssh
// jak zrobić aby DNS pytania były kierowane do naszego dns cos ala masquarading przekierowywanie
iptables -A INPUT -p tcp --sport 80 -j ACCEPT
iptables -A INPUT -p tcp --sport 443 -j ACCEPT
iptables -A INPUT -p tcp --sport 8080 -d 192.168.0.2 // proxy firmowe
iptables -A INPUT -p tcp --sport 9050 -d 192.168.0.2 // proxy firmowe
iptables -A INPUT -p udp --sport 53 -j ACCEPT
iptables -A OUTPUT -p udp --dport 53 -j ACCEPT
iptables -A FORWARD -i ppp0 -s 192.168.* -j DROP // nie wiem czy to ma tak byc spoofing z hostow z poza sieci
iptables -P INPUT DROP
iptables -P OUTPUT DROP
iptables -P FORWARD DROP