Thursday, March 28, 2013

Set up Auto login on Windows 7

Before I start, I just want to say that I do NOT approve of auto logging into a windows 7 computer. That being said, here's how you do it. :-)

1) Edit the registry with the regedit command, and find:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\AutoAdminLogon and change the value from 0 to 1

2) Press the Windows key + R on your keyboard to launch the “Run” dialog box and Type in control userpasswords2 and press enter
3) Uncheck the option “Users must enter a user name and password to use this computer”, if it is unchecked, check it and uncheck it again
4) Click “OK”, You will then be prompted to enter the current password and confirm it.
5) Reboot the computer and it should auto login with the user name you provided, and long as it is a valid account on the computer.

Tuesday, March 26, 2013

Installing an HTTP proxy server



First you need to install Squid:
 $ sudo -s
 # aptitude install squid3
Once squid is installed, you then need to edit the squid.conf file Usually located in the /etc/squid3 directory
 # leafpad /etc/squid3/squid.conf
once you have it open set the visible hostname for the server. In my config this was found around line 3771
For instance, if the server is named ubuntu:
visible_hostname ubuntu
The default port for squid is port 3128, I would suggest changing this to something different. In my config this was found around line 1147
In my config I used port 8877:
http_port 8877
Ok now we need to add permissions of who can actually make use of the proxy, by default no one can.
Search for the lines:
acl SSL_ports port 443
acl Safe_ports port 80  # http
acl Safe_ports port 21  # ftp
acl Safe_ports port 443  # https
acl Safe_ports port 70  # gopher
acl Safe_ports port 210  # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280  # http-mgmt
acl Safe_ports port 488  # gss-http
acl Safe_ports port 591  # filemaker
acl Safe_ports port 777  # multiling http
acl CONNECT method CONNECT
Add the subnet you want to make the proxy available to directly following the last line above. I added the following lines for my departmental subnets:
acl fivesix src 128.192.56.0/255.255.255.0
acl onesixty src 128.192.160.0/255.255.255.0
acl onesixtyone src 128.192.161.0/255.255.255.0
Now that we have defined the subnets we would like to be able to use the proxy we need to give them permissions to use the proxy.
Search for the lines:
# Example rule allowing access from your local networks.
# Adapt localnet in the ACL section to list your (internal) IP networks
# from where browsing should be allowed
#http_access allow localnet
http_access allow localhost
Add the following lines:
http_access allow fivesix
http_access allow onesixty
http_access allow onesixtyone
Save the config file and exit.
Restart the proxy server by typing the following:
         #service squid3 restart
Now all you have to do it go to any Windows 7 computer. Go into the control panel. Open Internet Options, and click on the Connections tab. Click on LAN settings and just enter your server information. close everything and in a browser navigate to whatismyip.com, you should see the proxy server listed.