[zorp-hu] SNAT

Ifj. Darvas Istvan Fireking@DarviNET.Hu
Tue, 19 Nov 2002 23:33:14 +0100


sziasztok,

A tproxy patch-el megpatcheltem a 2.4.19-es kernelemet, leforditottam majd
betoltottem a tproxy modulbol.

majd feltettem a 1.4.8-as zorpot a deb csomagbol, ami fent van a lapon...

elkovettem a kov konfigot:

....
from Zorp.NAT import *
.....
class Inter_SSH_Intra(PlugProxy):
        pass
....
def Test():
        Service("inter_SSH_intra",
                Inter_SSH_Intra,
                router=DirectedRouter(SockAddrInet ("192.168.0.100",22)),
                snat=ForgeClientSourceNAT())
        Listener(SockAddrInet(IP_OUT,30000), "inter_SSH_intra")


es azt vartam volna hogy bevisz SSH-n a belso gepre ugy, hogy latom a belso
gepen a konnektalo gep IP-jet...

valamit elcseszhettem, mert azt irja a zorp a logba, hogy nem tudja bindelni
a cimet....pedig tproxy-val megpactheltem a kernelt ;-(

Mit cseszhettem el?

sziasztok,
    Istvan


log: Nov 19 21:38:41 stargate Test[2807]: (zorp/nosession): Incoming
connection; remote='AF_INET(195.38.103.132:1216)', fd='9'
Nov 19 21:38:41 stargate Test[2807]: (Zorp@StarGate/inter_SSH_intra):
Connection accepted; client_address='AF_INET(195.38.10
3.132:1216)'
Nov 19 21:38:41 stargate Test[2807]: (Zorp@StarGate/inter_SSH_intra:0):
Starting proxy instance; client_fd='9', client_addre
ss='AF_INET(195.38.103.132:1216)', client_zone='Zone(internet, 0.0.0.0/0)',
client_local='AF_INET(213.222.165.148:30000)'
Nov 19 21:38:41 stargate Test[2807]: (Zorp@StarGate/inter_SSH_intra:0/plug):
Proxy starting; class='Inter_SSH_Intra', module
='plug'
Nov 19 21:38:41 stargate Test[2807]: (zorp/nosession): Module successfully
loaded; module='plug', file='/usr/lib/zorp/libplu
g.so'
Nov 19 21:38:41 stargate Test[2810]: (Zorp@StarGate/inter_SSH_intra:0/plug):
thread starting;
Nov 19 21:38:41 stargate Test[2810]: (Zorp@StarGate/inter_SSH_intra:0/plug):
calling __config__() event;
Nov 19 21:38:41 stargate Test[2810]: (Zorp@StarGate/inter_SSH_intra:0/plug):
calling config() event;
Nov 19 21:38:41 stargate Test[2810]: (Zorp@StarGate/inter_SSH_intra:0/plug):
Config dump, attribute value; name='packet_stat
s_interval', value='0'
Nov 19 21:38:41 stargate Test[2810]: (Zorp@StarGate/inter_SSH_intra:0/plug):
Config dump, attribute value; name='copy_to_cli
ent', value='1'
Nov 19 21:38:41 stargate Test[2810]: (Zorp@StarGate/inter_SSH_intra:0/plug):
Config dump, attribute value; name='timeout', v
alue='-1'
Nov 19 21:38:41 stargate Test[2810]: (Zorp@StarGate/inter_SSH_intra:0/plug):
Config dump, attribute value; name='copy_to_ser
ver', value='1'
Nov 19 21:38:41 stargate Test[2810]: (Zorp@StarGate/inter_SSH_intra:0/plug):
calling __startup__() event;
Nov 19 21:38:41 stargate Test[2810]: (Zorp@StarGate/inter_SSH_intra:0/plug):
calling startUp() event;
Nov 19 21:38:41 stargate Test[2810]: (zorp/nosession): Connecting to remote
host; local='AF_INET(195.38.103.132:0)', remote=
'AF_INET(192.168.0.100:22)'
Nov 19 21:38:41 stargate Test[2810]: (zorp/nosession): Changing process
capabilities; caps='= cap_net_bind_service+ep cap_ne
t_admin+p'
Nov 19 21:38:41 stargate Test[2810]: (zorp/nosession): Changing process
capabilities; caps='= cap_net_bind_service,cap_net_a
dmin+ep'
Nov 19 21:38:41 stargate Test[2810]: (zorp/nosession): bind() failed;
error='Cannot assign requested address'
Nov 19 21:38:41 stargate Test[2810]: (zorp/nosession): Resetting process
capabilities; caps='= cap_net_bind_service,cap_net_
admin+p'
Nov 19 21:38:41 stargate Test[2810]: (Zorp@StarGate/inter_SSH_intra:0/plug):
Exception occurred during connection establishm
ent;
Nov 19 21:38:41 stargate Test[2810]: (Zorp@StarGate/inter_SSH_intra:0/plug):
calling __destroy__() event;
Nov 19 21:38:41 stargate Test[2810]: (Zorp@StarGate/inter_SSH_intra:0/plug):
Proxy destroy; class='Inter_SSH_Intra', module=
'plug'
Nov 19 21:38:41 stargate Test[2810]: (Zorp@StarGate/inter_SSH_intra:0):
client: Shutdown channel; fd='9', mode='2'
Nov 19 21:38:41 stargate Test[2810]: (Zorp@StarGate/inter_SSH_intra:0):
client: Closing channel; fd='9'
Nov 19 21:38:41 stargate Test[2810]: (Zorp@StarGate/inter_SSH_intra:0/plug):
thread exiting;
Nov 19 21:38:41 stargate Test[2807]: (Zorp@StarGate/inter_SSH_intra:0/plug):
Proxy ending; class='Inter_SSH_Intra', module='
plug'
Nov 19 21:38:41 stargate Test[2807]: (Zorp@StarGate/inter_SSH_intra:0):
client: accounting info; duration='0', sent='0', rec
eived='0'