[zorp-hu] zorp inditas
Szűcs Tibor
zorp-hu@lists.balabit.hu
Tue, 3 Jun 2003 10:33:13 +0200
> > Most elindul de a policy ablak jön fel, logban a következő =
üzenetet
> > látom:
>
> megosztod velunk a Http proxyd konfiguraciojat?
>
> >
> > Jun 3 08:20:10 fw zorp[6375]: (zorp@bolyrt.hu/intra_http:0/http):
> > zorp@bolyrt.hu/intra_http:0/http: GET: http://www.boly.hu/
> > Jun 3 08:20:10 fw zorp[6375]: (zorp@bolyrt.hu/intra_http:0/http):
> > exiting keep-alive loop;
>
> valoszinuleg a method ellenorzo fuggvenyed ugy ter vissza, hogy a
proxy
> kilep (hint: HTTP_REQ_ACCEPT-tel tersz vissza?)
>
Szívesen bár ismerős lesz :-) a sima minta konfig még nem nyúltam hozzá
class IntraHttp(HttpProxy):
def config(self):
HttpProxy.config(self)
self.transparent_mode = TRUE
self.request_headers["User-Agent"] =
(HTTP_HDR_CHANGE_VALUE, "Lynx/2.8.3rel.1")
self.request["GET"] = (HTTP_REQ_POLICY, self.filterURL)
# self.parent_proxy = "proxy.site.net"
# self.parent_proxy_port = 3128
# self.timeout = 60000
# self.max_keepalive_requests = 10
def filterURL(self, method, url, version):
# return HTTP_REQ_REJECT here to reject this request
# change self.request_url to redirect to another url
# change connection_mode to HTTP_CONNECTION_CLOSE to
force kept-alive connections to close
log("http.info", 3, "%s: GET: %s" %
(self.session.session_id, url))
class IntraFtp(FtpProxy):
def config(self):
FtpProxy.config(self)
def init(name):
# create services
Service("intra_ssh", IntraPlug)
Service("intra_http", IntraHttp)
Service("intra_ftp", IntraFtp)
# bind services to listeners
# you'll need the packet filter redirect these connections, and
# to protect transparent listeners, since if you connect to
# a transparent listener directly, Zorp reconnects to itself.
Listener(SockAddrInet("192.168.0.253", 50080), "intra_http")
Listener(SockAddrInet("192.168.0.253", 50021), "intra_ftp")
Listener(SockAddrInet("192.168.0.253", 50022), "intra_ssh")
Robit