{"id":694,"date":"2021-01-17T10:53:00","date_gmt":"2021-01-17T10:53:00","guid":{"rendered":"https:\/\/xolowebsites.com\/elementor\/demo-1\/?p=694"},"modified":"2021-06-14T01:38:18","modified_gmt":"2021-06-14T01:38:18","slug":"proxy-chains","status":"publish","type":"post","link":"https:\/\/teza.blog\/index.php\/2021\/01\/17\/proxy-chains\/","title":{"rendered":"Using Proxy Chains to tunnel traffic over network"},"content":{"rendered":"\n<p>First, install proxychains. <br><br><code>sudo apt-get update -y<\/code><\/p>\n\n\n\n<p>$ <code>sudo apt-get install -y proxychains<\/code><br><br>$ <code>locate proxychains<\/code><br><\/p>\n\n\n\n<p>Then change the config files. The config files are in the code below.<\/p>\n\n\n\n<p> <br>$ <code>nano proxychains4.conf <\/code><br><br>If you wish, you can add more proxy address. <br>At the bottom of the conf file, add your proxy addresses. <\/p>\n\n\n\n<p>Format should be <br>proxy type     IP address   Port  Username password<\/p>\n\n\n\n<p>Example  socks5 101.2.3.123 12356<\/p>\n\n\n\n<p>There are many websites which you can find proxy addresses. just search for socks proxy. <\/p>\n\n\n\n<p><br>Use dynamic chain and link it with Tor<br>All you need to do is just unhash the lines that you want to enable. <br><br>$ <code>service tor status<\/code><\/p>\n\n\n\n<p><code>$ service tor stop \/start  <\/code> <\/p>\n\n\n\n<p><code>$ proxychains4 curl <a href=\"https:\/\/ipinfo.io\/city\">ipinfo.io\/city<\/a><\/code>   #this will tell you where your current location is. Check this first to make sure you are hidden. <\/p>\n\n\n\n<p>Now you can browse securely. <\/p>\n\n\n\n<p><code>$ proxychain firefox google.com<\/code><\/p>\n\n\n\n<p>You can also use proxychain with other services. You just need to run the proxychain command first. <\/p>\n\n\n\n<p>Example proxychain nmap 213.12.123.12 <\/p>\n\n\n\n<!--more-->\n\n\n\n<pre class=\"wp-block-preformatted\"><strong><span class=\"has-inline-color has-vivid-red-color\">Below is the config file for Proxychains.conf\n<\/span><\/strong>\n<code><span class=\"has-inline-color has-vivid-purple-color\"># proxychains.conf  VER 4.x\n#\n#        HTTP, SOCKS4a, SOCKS5 tunneling proxifier with DNS.\n\n\n# The option below identifies how the ProxyList is treated.\n# only one option should be uncommented at time,\n# otherwise the last appearing option will be accepted\n#\n#dynamic_chain\n#\n# Dynamic - Each connection will be done via chained proxies\n# all proxies chained in the order as they appear in the list\n# at least one proxy must be online to play in chain\n# (dead proxies are skipped)\n# otherwise EINTR is returned to the app\n#\nstrict_chain\n#\n# Strict - Each connection will be done via chained proxies\n# all proxies chained in the order as they appear in the list\n# all proxies must be online to play in chain\n# otherwise EINTR is returned to the app\n#\n#round_robin_chain\n#\n# Round Robin - Each connection will be done via chained proxies\n# of chain_len length\n# all proxies chained in the order as they appear in the list\n# at least one proxy must be online to play in chain\n# (dead proxies are skipped).\n# the start of the current proxy chain is the proxy after the last\n# proxy in the previously invoked proxy chain.\n# if the end of the proxy chain is reached while looking for proxies\n# start at the beginning again.\n# otherwise EINTR is returned to the app\n# These semantics are not guaranteed in a multithreaded environment.\n#\n#random_chain\n#\n# Random - Each connection will be done via random proxy\n# (or proxy chain, see  chain_len) from the list.\n# this option is good to test your IDS :)\n\n# Make sense only if random_chain or round_robin_chain\n#chain_len = 2\n\n# Quiet mode (no output from library)\n#quiet_mode\n\n## Proxy DNS requests - no leak for DNS data\n# (disable all of the 3 items below to not proxy your DNS requests)\n\n# method 1. this uses the proxychains4 style method to do remote dns:\n# a thread is spawned that serves DNS requests and hands down an ip\n# assigned from an internal list (via remote_dns_subset).\n# this is the easiest (setup-wise) and fastest method, however on\n# systems with buggy libcs and very complex software like webbrosers\n# this might not work and\/or cause crashes.\nproxy_dns\n\n# method 2. use the old proxyresolv script to proxy DNS requests\n# in proxychains 3.1 style. requires `proxyresolv` in $PATH\n# plus a dynamically linked `dig` binary.\n# this is a lot slower than `proxy_dns`, doesn't support .onion URLs,\n# but might be more compatible with complex software like webbrowsers.\n#proxy_dns_old\n\n# method 3. use proxychains4-daemon process to serve remote DNS requests.\n# this is similar to the threaded `proxy_dns` method, however it requires\n# that proxychains4-daemon is already running on the specified address.\n# on the plus side it doesn't do malloc\/threads so it should be quite\n# compatible with complex, async-unsafe software.\n# note that if you don't start proxychains4-daemon before using this,\n# the process will simply hang.\n#proxy_dns_daemon 127.0.0.1:1053\n\n# set the class A subnet number to use for the internal remote DNS mapping\n# we use the reserved 224.x.x.x range by default,\n# if the proxified app does a DNS request, we will return an IP from that range.\n# on further accesses to this ip we will send the saved DNS name to the proxy.\n# in case some control-freak app checks the returned ip, and denies to \n# connect, you can use another subnet, e.g. 10.x.x.x or 127.x.x.x.\n# of course you should make sure that the proxified app does not need\n# *real* access to this subnet. \n# i.e. dont use the same subnet then in the localnet section\n#remote_dns_subnet 127 \n#remote_dns_subnet 10\nremote_dns_subnet 224\n\n# Some timeouts in milliseconds\ntcp_read_time_out 15000\ntcp_connect_time_out 8000\n\n### Examples for localnet exclusion\n## localnet ranges will *not* use a proxy to connect.\n## note that localnet works only when plain IPv4 addresses are passed to the app,\n## the hostname resolves via \/etc\/hosts, or proxy_dns is disabled or proxy_dns_old used.\n\n## Exclude connections to 192.168.1.0\/24 with port 80\n# localnet 192.168.1.0:80\/255.255.255.0\n\n## Exclude connections to 192.168.100.0\/24\n# localnet 192.168.100.0\/255.255.255.0\n\n## Exclude connections to ANYwhere with port 80\n# localnet 0.0.0.0:80\/0.0.0.0\n\n## RFC5735 Loopback address range\n## if you enable this, you have to make sure remote_dns_subnet is not 127\n## you'll need to enable it if you want to use an application that \n## connects to localhost.\n# localnet 127.0.0.0\/255.0.0.0\n\n## RFC1918 Private Address Ranges\n# localnet 10.0.0.0\/255.0.0.0\n# localnet 172.16.0.0\/255.240.0.0\n# localnet 192.168.0.0\/255.255.0.0\n\n### Examples for dnat\n## Trying to proxy connections to destinations which are dnatted,\n## will result in proxying connections to the new given destinations.\n## Whenever I connect to 1.1.1.1 on port 1234 actually connect to 1.1.1.2 on port 443\n# dnat 1.1.1.1:1234  1.1.1.2:443\n\n## Whenever I connect to 1.1.1.1 on port 443 actually connect to 1.1.1.2 on port 443\n## (no need to write :443 again)\n# dnat 1.1.1.2:443  1.1.1.2\n\n## No matter what port I connect to on 1.1.1.1 port actually connect to 1.1.1.2 on port 443\n# dnat 1.1.1.1  1.1.1.2:443\n\n## Always, instead of connecting to 1.1.1.1, connect to 1.1.1.2\n# dnat 1.1.1.1  1.1.1.2\n\n# ProxyList format\n#       type  ip  port [user pass]\n#       (values separated by 'tab' or 'blank')\n#\n#       only numeric ipv4 addresses are valid\n#\n#\n#        Examples:\n#\n#            \tsocks5\t192.168.67.78\t1080\tlamer\tsecret\n#\t\thttp\t192.168.89.3\t8080\tjustu\thidden\n#\t \tsocks4\t192.168.1.49\t1080\n#\t        http\t192.168.39.93\t8080\t\n#\t\t\n#\n#       proxy types: http, socks4, socks5, raw\n#         * raw: The traffic is simply forwarded to the proxy without modification.\n#        ( auth types supported: \"basic\"-http  \"user\/pass\"-socks )\n#\n[ProxyList]\n# add proxy here ...\n# meanwile\n# defaults set to \"tor\"\nsocks4 \t127.0.0.1 9050\n\n<\/span><\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>First, install proxychains. sudo apt-get update -y $ sudo apt-get install -y proxychains $ locate proxychains Then change the config files. The config files are in the code below. $ nano proxychains4.conf If you wish, you can add more proxy address. At the bottom of the conf file, add your proxy addresses. Format should be &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/teza.blog\/index.php\/2021\/01\/17\/proxy-chains\/\" class=\"read-more\">Read More<span class=\"screen-reader-text\"> &#8220;Using Proxy Chains to tunnel traffic over network&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[82,1,83],"tags":[60,61],"class_list":["post-694","post","type-post","status-publish","format-standard","hentry","category-linux","category-networking","category-security","tag-proxy-chains","tag-tor"],"_links":{"self":[{"href":"https:\/\/teza.blog\/index.php\/wp-json\/wp\/v2\/posts\/694","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/teza.blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/teza.blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/teza.blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/teza.blog\/index.php\/wp-json\/wp\/v2\/comments?post=694"}],"version-history":[{"count":14,"href":"https:\/\/teza.blog\/index.php\/wp-json\/wp\/v2\/posts\/694\/revisions"}],"predecessor-version":[{"id":2218,"href":"https:\/\/teza.blog\/index.php\/wp-json\/wp\/v2\/posts\/694\/revisions\/2218"}],"wp:attachment":[{"href":"https:\/\/teza.blog\/index.php\/wp-json\/wp\/v2\/media?parent=694"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/teza.blog\/index.php\/wp-json\/wp\/v2\/categories?post=694"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/teza.blog\/index.php\/wp-json\/wp\/v2\/tags?post=694"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}