[zorp-hu] benazok

Gabor Halasz halaszg@schrack-seconet.hu
Fri, 19 Jul 2002 13:29:35 +0200


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?
Hogyan tudnek oda regezpet rakni?
Inbandrouter-rel tudom a ket masik hostra kuldeni a forgalmat?