Proxy auto-configuration for Windows and Linux

Operation systems generally can digest and look for a PAC file (="proxy auto-config"). They look for it using WPAD (="web proxy auto-discovery protocol").

Windows 7 and 8 do that. Ubuntu can do that (can be activated within the Network settings). For Fedora and Korora it's the same.

The PAC file can look like this one which provides "PAC with network and domain whitelisting".

For WPAD to work automatically the file should be served using the the MIME type application/x-ns-proxy-autoconfig. Its location should be announced via DHCP and DNS.

The DNS should announce either an A record (="host record") or an CNAME for the domain name wpad which should resolv to the IP of the machine that serves the PAC file. All in all it should be possible to access it over port 80 using http://wpad.[local_domain]/proxy.pac.

Using DHCP the file can be made available using any address and port. On a Linux machine the responsible configuration file /etc/dhcp/dhcpd.conf could look like this:

option local-proxy-config code 252 = text;  
...
subnet 192.168.0.0 netmask 255.255.255.0 {  
  range 192.168.0.100 192.168.0.200;
  ...
  option local-proxy-config "http://www.example.org/proxy.pac";
}

References
- Web Proxy Autodiscovery Protocol (wikipedia.org)
- Configuring Web proxy clients... (technet.microsoft.com)

parted: Warning: The resulting partition is not properly aligned for best performance.

sudo parted /dev/sdc mkpart primary ext4
Start? 0
End? -0

Ergab:

Warning: The resulting partition is not properly aligned for best performance.

Lösung:

sudo parted -a cylinder /dev/sdc mkpart primary ext4
Start? 0
End? -0

Ursache:

Die Sektoren der Festplatten sind mittlerweile physikalisch 4096 Bytes groß. Dem Betriebssystem wird aber dennoch aus Kompatibilitätsgründen 512er Sektoren vorgegaukelt. Damit es nicht zu Geschwindigkeiteinbußen kommt, müssen vier 512er genau über einem 4096 Sektor liegen. - http://www.ibm.com/developerworks/linux/library/l-4kb-sector-disk