Testelive
Penetration Lab Designer
LEVEL 1
300 XP
Don't leech and like the thread [Image: Amusing.png] (note that if you want to make changes to your proxy later you will have to reconnect to your admin account...)
Step 7: We will update our machine and install the proxy. To do so, just write the following commands "apt-get update", then once the update is done, write "apt-get install squid" and confirm with "y" and press enter.
Step 8: Now you have to configure the proxy. To do it, write "nano /etc/squid/squid.conf". Once in the configuration file click on the keyboard icon at the top right and select "ctrl + W" it will open a search bar. In the bar, search for "http_access deny all" and replace deny with allow (to move in a file, just use the arrows on your keyboard). Then search for "forwarded_for on". Remove the # before forwarded_for and replace on with off. Disable the logs by searching "# access_log daemon:/var/log/squid/access.log squid", remove the "#" and replace "daemon:/var/log/squid/access.log squid" with none. And now last step search for "http_port 3128".
You have several choices:
1, change the port to a port of your choice
2, copy the line and have multiple ports used (if you want to have multiple clients on a server)
3, leave the default port
Once this step is done, save the file with ctrl + o and enter, then exit the file with ctrl + x.
Step 10: Now we are going to delete the current logs, pretty simple. Just write "rm /var/log/squid/access.log".
Once all these steps have been followed, write the command "systemctl restart squid" and wait for the proxy to restart (it may take a little time)
Final: Try to connect to your proxy! Go back to https://console.cloud.google.com/compute/instances and copy the "external ip" from your machine. Now go to your browser and go to your preferences. As I am using firefox I go to about: preferences and search for "proxy" and in http]http proxy I enter the ip and the port. Then click on also use for and https.]https.
Finish. You now know how to create a proxy server. Note that you can use your VCC only once with google and that you will need to have a new one if you want to recreate an account (when trial go off Smart)
To see if the proxy work just go on https://whoer.net/
Step 7: We will update our machine and install the proxy. To do so, just write the following commands "apt-get update", then once the update is done, write "apt-get install squid" and confirm with "y" and press enter.
Step 8: Now you have to configure the proxy. To do it, write "nano /etc/squid/squid.conf". Once in the configuration file click on the keyboard icon at the top right and select "ctrl + W" it will open a search bar. In the bar, search for "http_access deny all" and replace deny with allow (to move in a file, just use the arrows on your keyboard). Then search for "forwarded_for on". Remove the # before forwarded_for and replace on with off. Disable the logs by searching "# access_log daemon:/var/log/squid/access.log squid", remove the "#" and replace "daemon:/var/log/squid/access.log squid" with none. And now last step search for "http_port 3128".
You have several choices:
1, change the port to a port of your choice
2, copy the line and have multiple ports used (if you want to have multiple clients on a server)
3, leave the default port
Once this step is done, save the file with ctrl + o and enter, then exit the file with ctrl + x.
Step 10: Now we are going to delete the current logs, pretty simple. Just write "rm /var/log/squid/access.log".
Once all these steps have been followed, write the command "systemctl restart squid" and wait for the proxy to restart (it may take a little time)
Final: Try to connect to your proxy! Go back to https://console.cloud.google.com/compute/instances and copy the "external ip" from your machine. Now go to your browser and go to your preferences. As I am using firefox I go to about: preferences and search for "proxy" and in http]http proxy I enter the ip and the port. Then click on also use for and https.]https.
Finish. You now know how to create a proxy server. Note that you can use your VCC only once with google and that you will need to have a new one if you want to recreate an account (when trial go off Smart)
To see if the proxy work just go on https://whoer.net/