[zorp-hu] http vagy ftp hiba
Kosa Attila
atkosa@shinwa.hu
Thu, 12 Apr 2001 15:37:47 +0200
On Thu, Apr 12, 2001 at 03:15:28PM +0200, Balazs Scheidler wrote:
>
> milyen modulokat hasznalsz ebben a zorp peldanyban? http-t gondolom biztos,
> egyeb? azt se artana kideriteni, hogy milyen sorrendben toltodnek be.
A kovetkezo a konfig:
from Zorp.Zorp import *
from Zorp import Zorp
from Zorp.Zone import InetZone
from Zorp.Service import Service
from Zorp.SockAddr import SockAddrInet
from Zorp.Chainer import TransparentChainer, DirectedChainer, InbandChainer, FailoverChainer
from Zorp.Plug import PlugProxy
from Zorp import Http
from Zorp.Http import HttpProxy
from Zorp.Ftp import FtpProxyAllow, FtpProxyMinimal
from Zorp.Listener import Listener
Zorp.firewall_name = 'zorp-web@shinwa.hu'
InetZone("webezes", "192.168.ZZZ.YYY",
inbound_services=[],
outbound_services=["bi_http", "bi_ftp"])
InetZone("internet", "0.0.0.0/0",
inbound_services=["bi_http", "bi_ftp"],
outbound_services=[])
class BIHttp(HttpProxy):
def config(self):
HttpProxy.config(self)
self.transparent_mode = 1
# self.request["GET"] = (Http.HTTP_POLICY, self.checkClient)
# self.request["POST"] = (Http.HTTP_POLICY, self.checkClient)
# self.request["HEAD"] = (Http.HTTP_POLICY, self.checkClient)
# self.allowed_clients = { "192.168.ZZZ.YYY":1 }
# def checkClient(self, method, url, version):
# try:
# if self.allowed_clients[self.session.client_address.ip_s]: return Z_ACCEPT
# except KeyError:
# pass
# return Z_DENY
class BIFtp(FtpProxyAllow):
def config(self):
FtpProxyAllow.config(self)
self.transparent_mode = 1
def init(name):
debug(5, "Policy init, name=%s" % name)
Service("bi_http", InbandChainer(), BIHttp)
Service("bi_ftp", TransparentChainer(), BIFtp)
Listener(SockAddrInet("192.168.ZZZ.XXX", XXXXX), "bi_http")
Listener(SockAddrInet("192.168.ZZZ.XXX", XXXXX), "bi_ftp")
Ha mar ugyis elkuldtem, akkor nem javitanatok ki a
kikommentezett reszt, hogy mukodjon? :) Igy az
except-nel jelzett hibat, azota nem volt idom vele
foglalkozni.
--
Udvozlettel
Zsiga