Commit c51d8dd5 by César Galvis

docs: updated readme and removed useless data

parent 25a280db
# Virtual Machine for Humboldt VPN setup
# Virtual Machine for VPN setup
Configuring a virtual machine to connect to the VPN through a proxy
Configuring a virtual machine to connect to a VPN (FortiNet) through a proxy
## Requirements
- `FortiClient` backup file yor your user.
- `FortiClient` backup file for your user in Windows.
## Setup
......@@ -24,41 +24,6 @@ sudo apt update && sudo apt install vagrant
Install VirtualBox from [here](https://www.virtualbox.org/wiki/Downloads)
### Configure environment
> Some steps from [dev.to](https://dev.to/sannae/setting-up-windows-virtual-test-environments-with-vagrant-4k1b)
> Check vagrant boxes [here](https://portal.cloud.hashicorp.com/vagrant/discover)
```sh
# Create a Vagrantfile and initiate the box
vagrant init gusztavvargadr/windows-11 --box-version 2302.0.2409
```
Generate `Chocolatey` script from [here](https://chocolatey.org/install) and add the file in `src/scripts/InstallChocolatey.ps1` file.
Add the following lines in `Vagrantfile`:
```ruby
# VM setup
config.vm.provider "virtualbox" do |vb|
vb.name = "Windows-VPN"
vb.memory = 1024
vb.cpus = 1
end
# Enable UI
config.vm.provider "virtualbox" do |vb|
vb.gui = true
end
# Provisioning
## Run the external script to install Chocolatey
config.vm.provision "shell", path: "src/scripts/InstallChocolatey.ps1"
## Run the inline script to install forticlientvpn via Chocolatey
config.vm.provision "shell", inline: "choco install forticlientvpn --yes"
```
### Run the virtual machine
```sh
......@@ -80,7 +45,26 @@ Copy your `FortiClient` backup file in `./files` folder and follow these steps:
#### Enable proxy
In Windows, open the `squid` program from the Windows menu. Right clicking on `Squid Server` tray icon and select the option `Open Squid Configuration`.
Replace the file content with [this file](src/config/squid-proxy.conf)
> **NOTE:** Change your local network value in the file
Then, restart the `squid` service. Now, you can add the proxy url in your host!
##### Add proxy in host
> **NOTE:** You can get the Windows IP address executing the `ifconfig` command in the virtual machine.
```sh
# Add parameters (change the proxy address first)
PROXY_ADDRESS=192.168.56.10
PROXY_PORT=3128
# Test the proxy
curl -x http://$PROXY_ADDRESS:$PROXY_PORT -I http://www.google.com
# Enable proxy in terminal
export http_proxy="http://$PROXY_ADDRESS:$PROXY_PORT"
export https_proxy="http://$PROXY_ADDRESS:$PROXY_PORT"
```
## Useful commands
......@@ -92,4 +76,6 @@ vagrant suspend
vagrant halt
# Destroy VM
vagrant destroy
# Reload configuration from Vagrantfile
vagrant reload
```
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment