lokiju, what you are describing is called an anonymizing middle box, and it's pretty much the safest setup you can have, because even if someone / malware roots your main computer, they would not be able to find your IP address. Here is some info on how to do it. https://trac.torproject.org/projects/tor/wiki/doc/TransparentProxy#AnonymizingMiddlebox