[zorp-hu] benazok
Balazs Scheidler
bazsi@balabit.hu
Fri, 19 Jul 2002 16:00:27 +0200
On Fri, Jul 19, 2002 at 01:29:35PM +0200, Gabor Halasz wrote:
> Ezt talaltam ki:
>
> class Http_C(HttpProxy):
> def config(self):
> HttpProxy.config(self)
> self.transparent_mode = 1
> self.request["GET"] = (HTTP_REQ_POLICY, self.filterURL)
> def filterURL(self, method, url, version):
> debug(0, "Request: '%s %s %s'" % (method, url, version))
> if ("http://webmail.xxx.hu" == url):
> self.request_url = "http://129.184.93.3/"
> return HTTP_REQ_ACCEPT
> if ("http://www.xxx.hu:8080/" == url):
> debug(0, "Request2: '%s %s %s'" % (method, url, version))
> self.request_url = "http://129.184.93.2/"
> return HTTP_REQ_ACCEPT
> self.error_info = "Our firewall under construction!"
> return HTTP_REQ_DENY
>
> A log:
>
> Jul 19 12:58:35 thewall Http[3910]: (tower.xxx.hu/Http_S:4): Starting proxy
> instance; client_fd='11', client_address='AF_INET(194.88.xx.xx:38499)',
> client_zone='Zone(internet, 0.0.0.0/0)',
> client_local='AF_INET(194.88.xx.xx:8080)'
> Jul 19 12:58:35 thewall Http[3910]: (tower.xxx.hu/Http_S:4/http): Proxy
> starting; class='Http_C', module='http'
> Jul 19 12:58:35 thewall Http[3933]: (zorp/nosession): Request: 'GET
> http://www.xxx.hu:8080/ HTTP/1.0'
> Jul 19 12:58:35 thewall Http[3933]: (tower.xxx.hu/Http_S:4/http): An error
> occurred, serving error file;
> filename='/usr/share/zorp/http/policyviolation.html'
> Jul 19 12:58:35 thewall Http[3933]: (tower.xxx.hu/Http_S:4/http): Proxy
> ending; class='Http_C', module='http'
> Jul 19 12:58:35 thewall Http[3933]: (tower.xxx.hu/Http_S:4): client:
> accounting info; duration='0', sent='607', received='330'
>
> A nyavajaim:
>
> Miert nem lesz igaz a feltetel, amikor a string megegyezik az url-lel?
A "Our firewall under construction!" szoveg kijon a hibalapon? Mert ha nem,
akkor elkepzelheto, hogy egy exception-t kapsz.
> Hogyan tudnek oda regezpet rakni?
import re, python re modul doksi
> Inbandrouter-rel tudom a ket masik hostra kuldeni a forgalmat?
>
>
> _______________________________________________
> zorp-hu mailing list
> zorp-hu@lists.balabit.hu
> https://lists.balabit.hu/mailman/listinfo/zorp-hu
--
Bazsi
PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1