8

I am trying to connect a Ubuntu 12.04 machine to a socks proxy server. I have my 192.168.30.0/24 LAN, and dante socks proxy server is running on 192.168.30.134:1018. I have also a pfsense router on 192.168.30.31 which creates a inferior LAN 192.168.1.0/24.

In this inferior LAN, I have an Ubuntu client machine and I need to connect it to my proxy server, so that all traffic on this machine is proxied. I have configured socks proxy in global ubuntu settings. pfsense firewall is configured to allow direct connection from LANtoWAN only to my socks proxy server (and also my local DNS and Google DNS).

All other traffic is blocked (because it should go through my proxy server). Browsing is working OK so I know It is configured right and going through proxy, but I cannot get apt-get update and etc. commands working. I was trying to configure proxychains or dante-client to run it with proxychains or socksify prefix but it doesn't work. socksify gives no result, and proxychains just give me failed to fetch http:// ....... Connection failed type of errors when I run it as a root.

How can I get apt-get working? Is it possible to manage it without any third party (dante-client, proxychains, etc.) client?

techraf
  • 3,306
  • 10
  • 26
  • 37
Lightman
  • 91
  • 1
  • 2
  • Another sad example for users downvoting and closevoting of things they don't understand. – LiveWireBT Apr 18 '14 at 08:10
  • @LiveWireBT I agree. I don't see why a downvote is at place here. This is a well explained and well researched question. – don.joey Apr 18 '14 at 08:21
  • Your router creates network 192.168.1.0/24 that means giving out addresses `192.168.1.1-192.168.1.254` so why have you given 192.168.30.x to your servers? – Gen Apr 18 '16 at 04:40

1 Answers1

1

In order for apt to work behind proxy, you need to set it in /etc/apt/apt.conf. Create this file and write the following to it:

Acquire::http::proxy "http://username:password@host:port_no/";
Acquire::https::proxy "https://username:password@host:port_no/";
Acquire::ftp::proxy "ftp://username:password@host:port_no/";
Acquire::socks::proxy "socks://username:password@host:port_no/";

Replacing username by your username and password by your password(if applicable) and host and port_no by the host of proxy and port no of your proxy.

jobin
  • 27,142
  • 16
  • 100
  • 116