Archiv verlassen und diese Seite im Standarddesign anzeigen : proxy erzwingen
waterproof
13.04.03, 14:05
hallo
ich möche für alle rechner im netz squid erzwingen
dazu habe ich im firewall.sh skript folgendes eingefügt
# Proxy erzwingen
iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT -to proxyhost:3128
iptables -t nat -A PREROUTING -p tcp --dport 443 -j DNAT -to proxyhost:3128
wenn ich dann die firewall starten will wird mir angezeigt:
root # /etc/init.d/firewall.sh start
Starte IP-Paketfilter
Bad argument `proxyhost:3128'
Try `iptables -h' or 'iptables --help' for more information.
Bad argument `proxyhost:3128'
Try `iptables -h' or 'iptables --help' for more information.
als proxyhost habe ich schon die ip adresse des squid rechners und hostname versucht
hi
nehme mal --to-destination
wenn proxyhost eine variable ist, mußt du die glaub ich so aufrufen => $proxyhost
Gruß HL
waterproof
13.04.03, 14:29
das mit destination habe ich versucht leider löst das nicht das problem
proxyhost ist keine variable
ich habe einfach nur die ip adresse statt proxyhost geschieben
hm
also vor to müssen 2 -- stehen.
--to-destination xxx.xxx.xx.x.:3128 sollte eigentlich gehen. anders hatte ich mein nat beim donkey damals auch nicht, bis auf den *umgebogenen* port.
Gruß HL
waterproof
13.04.03, 16:25
danke jetzt liefert das firewall.sh beim starten keine fehlermeldung
allerdings bekomm ich jetzt bei jeder seite
ERROR
The requested URL could not be retrieved
While trying to retrieve the URL: /
The following error was encountered:
* Invalid URL
Some aspect of the requested URL is incorrect. Possible problems:
* Missing or incorrect access protocol (should be `http://'' or similar)
* Missing hostname
* Illegal double-escape in the URL-Path
* Illegal character in hostname; underscores are not allowed
wenn ich das proxy erzwingen aus der firewall rausnehme, und dann den proxy manuell beim browser eintrage bekomme ich die meldung nicht
hi
du brauchst natürlich auch noch entsprechende filterregeln. nur mal als beispiel vom lan ==> proxy
iptables -A FORWARD -i $int -o $ext -p tcp --dport 80 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
$int <== interface, wo das lan dranhängt
$ext <== interface, wo der proxy dranhängt(sofern der z.b. in der DMZ steht)
dann fehlen noch die regeln für proxy ==> internet, die du aber glaube ich schon hast. und noch eine regel für pakete, die zu bestehenden verbindungen gehören.
ps: oder läuft der proxy auf dem firewallrechner?
Gruß HL
Darf der Proxy denn noch ins Internet?
waterproof
13.04.03, 17:07
proxy läuft auf firewallrechner
ich hab in die squid.conf
httpd_accel_host 192.168.0.1
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on
jetzt noch dazugeschrieben
dann funktioniert alles
vielen dank HangLoose und I-Master für eure hilfe ;)
Nix zu danken, hab ja nur geklug*******ert ;)
proxy läuft auf firewallrechner
jaja man sollte immer seinen netzaufbau posten, dann hätte ich mir das letzte posting sparen können ;).
btw. für den fall, das der proxy auf dem firewallrechner läuft, verwendet man im allgemeinen
REDIRECT, ein spezialfall von DNAT.
iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 3128
Gruß HL
Powered by vBulletin® Version 4.2.5 Copyright ©2024 Adduco Digital e.K. und vBulletin Solutions, Inc. Alle Rechte vorbehalten.