[zorp-hu] Forras cim a httpd logba ujra

Barina Tamas zorp-hu@lists.balabit.hu
Thu, 4 Nov 2004 16:08:08 +0100


Sziasztok.

Vegigbongesztem az archivumot, de nem talaltam megoldast a kovetkezo
problemara.
Adott egy tuzfal zorppal, mogotte ket webszerver.
Szeretnem atadni az IP cimet logelemzesnek, de nem akar menni.

Zorp verzio: 2.0.9


class WD_http(HttpProxy):
    def config(self):
        HttpProxy.config(self)
        self.request["GET"] =3D (HTTP_REQ_POLICY, self.filterURL)
        self.request["POST"] =3D (HTTP_REQ_POLICY, self.filterURL)

    def filterURL(self, method, url, version):
        if self.request_url_host =3D=3D "www.akarmi1.hu":
           self.session.server_address =3D SockAddrInet("192.168.1.100", =
8080)
           return HTTP_REQ_ACCEPT
        if self.request_url_host =3D=3D "www.akarmi2.hu":
            self.session.server_address =3D =
SockAddrInet("192.168.2.100", 80)
            return HTTP_REQ_ACCEPT
        else :
            self.session.server_address =3D =
SockAddrInet("192.168.1.100", 80)
            return HTTP_REQ_ACCEPT


       Service("WD_http", WD_http,
router=3DDirectedRouter(dest_addr=3DSockAddrInet('192.168.1.100', 80)))


        Listener(SockAddrInet('195.70.xx.xx', 50080), 'WD_http')

Hol tudom megadni???



K=F6sz=F6n=F6m:
Barina Tam=E1s