Working through a Microsoft Proxy Server (reprise)

New address setup in office, meant my skunkworks server fuligin, running Debian jessie, had to have a new IP address. With the new address updated in /etc/network/interfaces, and /etc/init.d/networking restart run, the new address was not assigned. Consulting the daemon log:

Jul 15 10:18:40 fuligin networking[31764]: Configuring network interfaces...Error: an inet prefix is expected rather than "".
Jul 15 10:18:40 fuligin networking[31764]: Failed to bring up eth1.
Jul 15 10:18:40 fuligin networking[31764]: done.

I completely missed the obvious error in the network mask specification and decided that the problem was somehow connnected to systemd. Debian jessie has systemd networking control turned off by default (should have been a clue), so I first created the configuration file /etc/systemd/network/, with the following content:



The service can then be enabled and started by:

  systemctl enable systemd-networkd
  systemctl start systemd-networkd

If I had spotted the error in /etc/networking/interfaces, I wouldn't have had to do all this.

With the network operational, I discovered the next problem. I was unable to run apt-get update, since it returned timeout errors on the sources. This turned out to be because the server is now behind a Microsoft proxy server. How could I figure out what that was, so I could configure apt-get to use it?

Our office setup needs the "Automatically detect settings" checkbox ticked for the web browser. This means we are using the Windows Proxy Address Detection capability. This uses a well known address to obtain the proxy information http://wpad/wpad.dat. We can get hold of it via wget:

  wget http://wpad/wpad.dat

The contents appear to be Javascript, but it was easy to see the proxy in use for our office. I then added this proxy to the apt-get configuration file (/etc/apt/apt.conf file), with:

  Acquire::http::Proxy "http://PROXY:PORT";

The other thing I had to figure out was how to get ftp working to an ftp server in our US office. The firewall appeared to block the FTP port, but ssh was working. I usually use lftp (for the handy mirror command). lftp supports the fish protocol (ftp over ssh), so all that's required is a slight adjustment to the connection string: