emerge tsocks, if you can’t download the package using emerge because you are behind a firewall, manually download the package using your web browser and put it under /usr/portage/distfiles, then type the emerge command again.
once installed, create a new tsocks configuration: /etc/socks/tsocks.conf
local = 192.168.2.0/255.255.255.0
path {
reaches = 0.0.0.0/0
server = 192.168.2.1
server_type [...]