[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-dev] how to simulate TOR network through chutney?



sorry forgot to includetor -f /home/raboon/chutney-master/net/nodes/000a/torrc
Jan 11 14:10:18.730 [notice] Tor v0.2.6.2-alpha-dev running on Linux with Libevent 2.0.21-stable, OpenSSL 1.0.1f and Zlib 1.2.8.
Jan 11 14:10:18.730 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning
Jan 11 14:10:18.730 [notice] This version is not a stable Tor release. Expect more bugs than usual.
Jan 11 14:10:18.730 [notice] Read configuration file "/home/raboon/chutney-master/net/nodes/000a/torrc".
Jan 11 14:10:18.738 [notice] Based on detected system memory, MaxMemInQueues is set to 2863 MB. You can override this by setting MaxMemInQueues by hand.
Jan 11 14:10:18.738 [warn] Tor is running as an exit relay. If you did not want this behavior, please set the ExitRelay option to 0. If you do want to run an exit Relay, please set the ExitRelay option to 1 to disable this warning, and for forward compatibility.
Jan 11 14:10:18.738 [warn] You have used DirAuthority or AlternateDirAuthority to specify alternate directory authorities in your configuration. This is potentially dangerous: it can make you look different from all other Tor users, and hurt your anonymity. Even if you've specified the same authorities as Tor uses by default, the defaults could change in the future. Be sure you know what you're doing.
Jan 11 14:10:18.738 [warn] The DirAuthority options 'hs' and 'no-hs' are obsolete; you don't need them any more.
Jan 11 14:10:18.738 [warn] The DirAuthority options 'hs' and 'no-hs' are obsolete; you don't need them any more.
Jan 11 14:10:18.738 [warn] The DirAuthority options 'hs' and 'no-hs' are obsolete; you don't need them any more.
Jan 11 14:10:18.738 [warn] V3AuthVotingInterval is very low. This may lead to failure to synchronise for a consensus.
Jan 11 14:10:18.738 [warn] TestingTorNetwork is set. This will make your node almost unusable in the public Tor network, and is therefore only advised if you are building a testing Tor network!
Jan 11 14:10:18.739 [notice] Opening OR listener on 0.0.0.0:5000
Jan 11 14:10:18.739 [warn] Could not bind to 0.0.0.0:5000: Address already in use. Is Tor already running?
Jan 11 14:10:18.739 [notice] Opening Directory listener on 0.0.0.0:7000
Jan 11 14:10:18.739 [warn] Could not bind to 0.0.0.0:7000: Address already in use. Is Tor already running?
Jan 11 14:10:18.739 [warn] Failed to parse/validate config: Failed to bind one of the listener ports.
Jan 11 14:10:18.739 [err] Reading config failed--see warnings above.


tor -f /home/raboon/chutney-master/net/nodes/004c/torrc
Jan 11 14:11:01.055 [notice] Tor v0.2.6.2-alpha-dev running on Linux with Libevent 2.0.21-stable, OpenSSL 1.0.1f and Zlib 1.2.8.
Jan 11 14:11:01.055 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning
Jan 11 14:11:01.055 [notice] This version is not a stable Tor release. Expect more bugs than usual.
Jan 11 14:11:01.055 [notice] Read configuration file "/home/raboon/chutney-master/net/nodes/004c/torrc".
Jan 11 14:11:01.066 [warn] You have used DirAuthority or AlternateDirAuthority to specify alternate directory authorities in your configuration. This is potentially dangerous: it can make you look different from all other Tor users, and hurt your anonymity. Even if you've specified the same authorities as Tor uses by default, the defaults could change in the future. Be sure you know what you're doing.
Jan 11 14:11:01.066 [warn] The DirAuthority options 'hs' and 'no-hs' are obsolete; you don't need them any more.
Jan 11 14:11:01.066 [warn] The DirAuthority options 'hs' and 'no-hs' are obsolete; you don't need them any more.
Jan 11 14:11:01.066 [warn] The DirAuthority options 'hs' and 'no-hs' are obsolete; you don't need them any more.
Jan 11 14:11:01.066 [warn] TestingTorNetwork is set. This will make your node almost unusable in the public Tor network, and is therefore only advised if you are building a testing Tor network!
Jan 11 14:11:01.067 [notice] Opening Socks listener on 127.0.0.1:9004


On Sun, Jan 11, 2015 at 2:09 PM, Mohiuddin Ebna Kawsar <mohiuddin.kawsar@xxxxxxxxx> wrote:
Hi teor,

Thanks for quick reply. i just download new chutney from github and able to run chutney for nodes = a(3) + r(1) + c(1) but when i set nodes = a(3) + c(1) i got following messageÂ
##############################################################
./chutney start networks/basic-min
Starting nodes
<type 'exceptions.IOError'>
Python 2.7.8: /usr/bin/python2
Sun Jan 11 14:00:27 2015

A problem occurred in a Python script. Here is the sequence of
function calls leading up to the error, in the order they occurred.

Â/usr/lib/python2.7/runpy.py in _run_module_as_main(mod_name='chutney.TorNet', alter_argv=1)
 160     sys.argv[0] = fname
 161   return _run_code(code, main_globals, None,
 162           Â"__main__", fname, loader, pkg_name)
 163Â
 164 def run_module(mod_name, init_globals=None,
fname = '/home/raboon/chutney-master/lib/chutney/TorNet.py'
loader = <pkgutil.ImpLoader instance>
pkg_name = 'chutney'

Â/usr/lib/python2.7/runpy.py in _run_code(code=<code object <module> at 0x7f9cbd16e3b0, file "/...n/chutney-master/lib/chutney/TorNet.py", line 10>, run_globals={'ConfigureNodes': <function ConfigureNodes>, 'DEFAULTS': {'auth_cert_lifetime': 12, 'authorities': 'AlternateDirAuthority bleargh bad torrc file!', 'authority': False, 'bridge': False, 'bridgeauthority': False, 'bridges': 'Bridge bleargh bad torrc file!', 'chutney_dir': '.', 'connlimit': 60, 'controlport_base': 8000, 'core': True, ...}, 'LocalNodeBuilder': <class '__main__.LocalNodeBuilder'>, 'LocalNodeController': <class '__main__.LocalNodeController'>, 'Network': <class '__main__.Network'>, 'Node': <class '__main__.Node'>, 'NodeBuilder': <class '__main__.NodeBuilder'>, 'NodeController': <class '__main__.NodeController'>, 'TorEnviron': <class '__main__.TorEnviron'>, '_BASE_ENVIRON': <__main__.TorEnviron object>, ...}, init_globals=None, mod_name='__main__', mod_fname='/home/raboon/chutney-master/lib/chutney/TorNet.py', mod_loader=<pkgutil.ImpLoader instance>, pkg_name='chutney')
 Â70            Â__loader__ = mod_loader,
 Â71            Â__package__ = pkg_name)
 Â72   exec code in run_globals
 Â73   return run_globals
 Â74Â
code = <code object <module> at 0x7f9cbd16e3b0, file "/...n/chutney-master/lib/chutney/TorNet.py", line 10>
run_globals = {'ConfigureNodes': <function ConfigureNodes>, 'DEFAULTS': {'auth_cert_lifetime': 12, 'authorities': 'AlternateDirAuthority bleargh bad torrc file!', 'authority': False, 'bridge': False, 'bridgeauthority': False, 'bridges': 'Bridge bleargh bad torrc file!', 'chutney_dir': '.', 'connlimit': 60, 'controlport_base': 8000, 'core': True, ...}, 'LocalNodeBuilder': <class '__main__.LocalNodeBuilder'>, 'LocalNodeController': <class '__main__.LocalNodeController'>, 'Network': <class '__main__.Network'>, 'Node': <class '__main__.Node'>, 'NodeBuilder': <class '__main__.NodeBuilder'>, 'NodeController': <class '__main__.NodeController'>, 'TorEnviron': <class '__main__.TorEnviron'>, '_BASE_ENVIRON': <__main__.TorEnviron object>, ...}

Â/home/raboon/chutney-master/lib/chutney/TorNet.py in <module>()
 952     return -1
 953   return 0
 954Â
 955 if __name__ == '__main__':
 956   sys.exit(main())
sys = <module 'sys' (built-in)>
sys.exit = <built-in function exit>
main = <function main>

Â/home/raboon/chutney-master/lib/chutney/TorNet.py in main()
 948   args = parseArgs()
 949   f = open(args['network_cfg'])
 950   result = runConfigFile(args['action'], f)
 951   if result is False:
 952     return -1
result undefined
global runConfigFile = <function runConfigFile>
args = {'action': 'start', 'network_cfg': 'networks/basic-min'}
f = <open file 'networks/basic-min', mode 'r'>

Â/home/raboon/chutney-master/lib/chutney/TorNet.py in runConfigFile(verb='start', data="" file 'networks/basic-min', mode 'r'>)
 925     return
 926Â
 927   return getattr(network, verb)()
 928Â
 929Â
builtingetattr = <built-in function getattr>
network = <__main__.Network object>
verb = 'start'

Â/home/raboon/chutney-master/lib/chutney/TorNet.py in start(self=<__main__.Network object>)
 832     else:
 833       print("Starting nodes")
 834     rv = all([n.getController().start() for n in self._nodes])
 835     # now print a newline unconditionally - this stops poll()ing
 836     # output from being squashed together, at the cost of a blank
rv undefined
builtinall = <built-in function all>
n = <__main__.Node object>
n.getController = <bound method Node.getController of <__main__.Node object>>
).start undefined
self = <__main__.Network object>
self._nodes = [<__main__.Node object>, <__main__.Node object>, <__main__.Node object>, <__main__.Node object>]

Â/home/raboon/chutney-master/lib/chutney/TorNet.py in start(self=<__main__.LocalNodeController object>)
 584       else:
 585         raise
 586     if self.waitOnLaunch():
 587       # this requires that RunAsDaemon is set
 588       p.wait()
self = <__main__.LocalNodeController object>
self.waitOnLaunch = <bound method LocalNodeController.waitOnLaunch of <__main__.LocalNodeController object>>

Â/home/raboon/chutney-master/lib/chutney/TorNet.py in waitOnLaunch(self=<__main__.LocalNodeController object>)
 636     # RunAsDaemon default is 0
 637     runAsDaemon = False
 638     with open(self._getTorrcFname(), 'r') as f:
 639       for line in f.readlines():
 640         stline = line.strip()
builtinopen = <built-in function open>
self = <__main__.LocalNodeController object>
self._getTorrcFname = <bound method LocalNodeController._getTorrcFname of <__main__.LocalNodeController object>>
f undefined
<type 'exceptions.IOError'>: [Errno 2] No such file or directory: '/home/raboon/chutney-master/net/nodes/003c/torrc'
  __class__ = <type 'exceptions.IOError'>
  __delattr__ = <method-wrapper '__delattr__' of exceptions.IOError object>
  __dict__ = {}
  __doc__ = 'I/O operation failed.'
  __format__ = <built-in method __format__ of exceptions.IOError object>
  __getattribute__ = <method-wrapper '__getattribute__' of exceptions.IOError object>
  __getitem__ = <method-wrapper '__getitem__' of exceptions.IOError object>
  __getslice__ = <method-wrapper '__getslice__' of exceptions.IOError object>
  __hash__ = <method-wrapper '__hash__' of exceptions.IOError object>
  __init__ = <method-wrapper '__init__' of exceptions.IOError object>
  __new__ = <built-in method __new__ of type object>
  __reduce__ = <built-in method __reduce__ of exceptions.IOError object>
  __reduce_ex__ = <built-in method __reduce_ex__ of exceptions.IOError object>
  __repr__ = <method-wrapper '__repr__' of exceptions.IOError object>
  __setattr__ = <method-wrapper '__setattr__' of exceptions.IOError object>
  __setstate__ = <built-in method __setstate__ of exceptions.IOError object>
  __sizeof__ = <built-in method __sizeof__ of exceptions.IOError object>
  __str__ = <method-wrapper '__str__' of exceptions.IOError object>
  __subclasshook__ = <built-in method __subclasshook__ of type object>
  __unicode__ = <built-in method __unicode__ of exceptions.IOError object>
  args = (2, 'No such file or directory')
  errno = 2
  filename = '/home/raboon/chutney-master/net/nodes/003c/torrc'
  message = ''
  strerror = 'No such file or directory'

The above is a description of an error in a Python program. Here is
the original traceback:

Traceback (most recent call last):
 File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
  "__main__", fname, loader, pkg_name)
 File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
  exec code in run_globals
 File "/home/raboon/chutney-master/lib/chutney/TorNet.py", line 956, in <module>
  sys.exit(main())
 File "/home/raboon/chutney-master/lib/chutney/TorNet.py", line 950, in main
  result = runConfigFile(args['action'], f)
 File "/home/raboon/chutney-master/lib/chutney/TorNet.py", line 927, in runConfigFile
  return getattr(network, verb)()
 File "/home/raboon/chutney-master/lib/chutney/TorNet.py", line 834, in start
  rv = all([n.getController().start() for n in self._nodes])
 File "/home/raboon/chutney-master/lib/chutney/TorNet.py", line 586, in start
  if self.waitOnLaunch():
 File "/home/raboon/chutney-master/lib/chutney/TorNet.py", line 638, in waitOnLaunch
  with open(self._getTorrcFname(), 'r') as f:
IOError: [Errno 2] No such file or directory: '/home/raboon/chutney-master/net/nodes/003c/torrc'

#############################################################

i also attached torc and template files.Â

i used wire-shark just to make sure that exit node reside on my host rather then using TOR network,nothing else.

Regards
kawsar


On Sun, Jan 11, 2015 at 1:16 PM, teor <teor2345@xxxxxxxxx> wrote:
Date: Sun, 11 Jan 2015 12:29:34 +0100
From: Mohiuddin Ebna Kawsar <mohiuddin.kawsar@xxxxxxxxx>

Thank's for your answer with good explanation. yes it worked for
(Authority.getN(3) + Relay.getN(1) + Client.getN(1) ) . For this i have
installed tor-0.2.6.2-alpha-dev and download newest chutney where exit-v4.i
or exit-v6.i don't exist .

These files exist in the latest version.
Several bugs that make tor network bootstrap fail or slow have been fixed recently.
(And others are being fixed soon.)
Please get the newest chutney from git and keep it up to date.

now i can see thorough wire-shark that which server i'm queering.
But i got "Couldn't launch test003c (tor --quiet -f
chutney/net/nodes/003c/torrc): 255" when i use Â(Authority.getN(3) Â+
Client.getN(1) ) as you mentioned.

Your client torrc is broken - this should not happen if you only edited the authority.tmpl file.
How did you change the common.i or client.tmpl files?

Run the command in the error message without the "--quiet" flag to find out why tor is failing.

and is it also possible to find which authority is acting exit-node?

Each authority/relay can act as an exit, and the client may use different exits for different connections.
You can use arm to access the client's control port and it should tell you the path(s) it is using.
Or you can set up debug logging on the client and it should tell you the path as well.

However, wireshark will never tell you, because that's the whole point of Tor: you can only ever see the connections, not how the packets are being relayed.

There is documentation on arm in its manual page, and tor logging in its manual page.

teor

teor2345 at gmail dot com
pgp 0xABFED1AC
https://gist.github.com/teor2345/d033b8ce0a99adbc89c5

teor at blah dot im
OTR C3C57B23 349825DEÂ929A1DEF C3531C25ÂA32287ED

_______________________________________________
tor-dev mailing list
tor-dev@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev



_______________________________________________
tor-dev mailing list
tor-dev@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev