Ich habe ein paar Regelprobleme und kann sie selbst leider nicht lösen. Hier das Fehlerlog. Ich versuche ein Secure Debian als Proxy/Firewall einzurichten.
Weis jemand was hier nicht stimmt?
####VARIABLEN
##Interfaces
Loopback="lo"
Internal="eth0"
External="eth1"
Internal_Net="192.168.1.0/24"
##Dienste/Server
DNS_Server=192.168.1.1:53
"cut"
--------------------------------------------------------------------------
Fehler
##Interne Ip Adresse
Int_IP='ifconfig $Internal | grep inet | grep -v inet6 | cut -d : -f 2 | cut -d ' ' -f 1
#Externe IP Adresse
Ext_IP='ifconfig $External | grep inet | grep -v inet6 | cut -d : -f 2 | cut -d ' ' -f 1
iptables -A POSTROUTING -t nat -p tcp -o eth1 -m multiport --dport 20,21,22,25,53,80,443,546,547,1701,110,143,993,995,3389 -j REDIRECT --to-ports 3128
iptables: Invalid argument. Run `dmesg' for more information.
iptables -A POSTROUTING -t nat -p udp -o eth1 -m multiport --dport 20,21,22,25,53,80,443,546,547,1701,110,143,993,995,3389 -j REDIRECT --to-ports 3128
iptables: Invalid argument. Run `dmesg' for more information.
<<--Was ist hier falsch??
---------------------------------------------------------------------------------------------------
iptables -A INPUT -i eth0 '!' -d -j DROP
Bad argument `DROP'
Try `iptables -h' or 'iptables --help' for more information.
<<--Hier hab ich die Variable $Int_IP eingetragen aber er schluckt sie nicht warum?
iptables -A INPUT -i eth0 '!' -d $Int_IP -j DROP
---------------------------------------------------------------------------------------------------
iptables -A OUTPUT -o eth0 '!' -s
iptables v1.4.9.1: option `-s' requires an argument
Try `iptables -h' or 'iptables --help' for more information.
<<--Er schluckt hier die variable nicht eigentlich sieht das so aus:
iptables -A OUTPUT -o $Internal ! -s $Int_IP
---------------------------------------------------------------------------------------------------
iptables -A OUTPUT -o eth0 -s -d 192.168.1.0/24 -m state --state NEW -j ACCEPT
Bad argument `192.168.1.0/24'
Try `iptables -h' or 'iptables --help' for more information.
<<--als destination hab ich hier die variable $Internal_Net eingetragen was stimmt nicht?
---------------------------------------------------------------------------------------------------
iptables -A PREROUTING -t nat -p tcp -i eth1 -d --dport 22 -j DNAT --to-destination eth1
Bad argument `22'
Try `iptables -h' or 'iptables --help' for more information.
iptables -A PREROUTING -t nat -p tcp -i eth1 -d --dport 80 -j DNAT --to-destination eth1
Bad argument `80'
Try `iptables -h' or 'iptables --help' for more information.
<<--er schluckt die ports nicht aber warum??
----------------------------------------------------------------------------------------------------
Welche Service ports (0:1024) würdet ihr immer offen lassen?
Was müsste ich noch verändern um ipv6 mit einzubeziehen?
* Das ist ein Fehlerlog bitte die Pluszeichen und Striche die nicht auskommentiert sind missachten
Über jede Hilfe bin ich sehr dankbar. Die meisten Fehler habe ich selber bereinigt aber das da oben bekomme ich nich hin :-/
Mfg
Benjamin