Commit 6ab53c8f by César Galvis

feat: solved issue with pac server and added security improvements

parent ed2091b5
...@@ -35,7 +35,13 @@ Vagrant.configure("2") do |config| ...@@ -35,7 +35,13 @@ Vagrant.configure("2") do |config|
## Set up proxy ## Set up proxy
config.vm.provision "file", source: "./src/config/squid-proxy.conf", destination: "C:/Squid/etc/squid/squid.conf" config.vm.provision "file", source: "./src/config/squid-proxy.conf", destination: "C:/Squid/etc/squid/squid.conf"
## Set up PAC ## Set up PAC
config.vm.provision "file", source: "./src/scripts/ps/PacServer.ps1", destination: "C:/files/PacServer.ps1"
config.vm.provision "shell", path: "src/scripts/ps/PacInstall.ps1" config.vm.provision "shell", path: "src/scripts/ps/PacInstall.ps1"
## Enable UAC
config.vm.provision "shell", inline: <<-'SHELL'
Write-Output "=== Enable UAC ==="
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" -Name "ConsentPromptBehaviorAdmin" -Value 2
SHELL
## Restart machine ## Restart machine
config.vm.provision :shell do |shell| config.vm.provision :shell do |shell|
shell.privileged = true shell.privileged = true
......
...@@ -9,7 +9,7 @@ PROXY_PORT=3128 ...@@ -9,7 +9,7 @@ PROXY_PORT=3128
SSH_SERVER=domain.com SSH_SERVER=domain.com
SSH_USER=user SSH_USER=user
SSH_PORT=22 SSH_PORT=22
SSH_PRIVATE_KEY=key SSH_PRIVATE_KEY=key.pem
# Connect to SSH server with proxy # Connect to SSH server with proxy
ssh -o ProxyCommand="corkscrew $PROXY_SERVER $PROXY_PORT %h %p" -i "$SSH_PRIVATE_KEY" -p "$SSH_PORT" "$SSH_USER@$SSH_SERVER" ssh -o ProxyCommand="corkscrew $PROXY_SERVER $PROXY_PORT %h %p" -i "$SSH_PRIVATE_KEY" -p "$SSH_PORT" "$SSH_USER@$SSH_SERVER"
\ No newline at end of file
...@@ -11,7 +11,7 @@ SSH_USER=user ...@@ -11,7 +11,7 @@ SSH_USER=user
SSH_PORT=22 SSH_PORT=22
SSH_TUNNEL_LOCAL_PORT=80 SSH_TUNNEL_LOCAL_PORT=80
SSH_TUNNEL_REMOTE_PORT=80 SSH_TUNNEL_REMOTE_PORT=80
SSH_PRIVATE_KEY=key SSH_PRIVATE_KEY=key.pem
# Make SSH tunnel with proxy # Make SSH tunnel with proxy
ssh -o ProxyCommand="corkscrew $PROXY_SERVER $PROXY_PORT %h %p" -i "$SSH_PRIVATE_KEY" -NL $SSH_TUNNEL_LOCAL_PORT:localhost:$SSH_TUNNEL_REMOTE_PORT -p "$SSH_PORT" $SSH_USER@$SSH_SERVER ssh -o ProxyCommand="corkscrew $PROXY_SERVER $PROXY_PORT %h %p" -i "$SSH_PRIVATE_KEY" -NL $SSH_TUNNEL_LOCAL_PORT:localhost:$SSH_TUNNEL_REMOTE_PORT -p "$SSH_PORT" $SSH_USER@$SSH_SERVER
\ No newline at end of file
...@@ -5,7 +5,7 @@ Set-ExecutionPolicy Bypass -Force ...@@ -5,7 +5,7 @@ Set-ExecutionPolicy Bypass -Force
# Variables # Variables
$taskName = "StartPACServer" $taskName = "StartPACServer"
$proxyScriptPath = "C:\\vagrant\src\scripts\ps\PacServer.ps1" $proxyScriptPath = "C:\\files\PacServer.ps1"
# Check if the scheduled task already exists # Check if the scheduled task already exists
if (Get-ScheduledTask -TaskName $taskName -ErrorAction SilentlyContinue) { if (Get-ScheduledTask -TaskName $taskName -ErrorAction SilentlyContinue) {
......
...@@ -37,4 +37,5 @@ Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Search" ...@@ -37,4 +37,5 @@ Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Search"
## Remove task view ## Remove task view
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "ShowTaskViewButton" -Value 0 -Force Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "ShowTaskViewButton" -Value 0 -Force
## Remove widgets ## Remove widgets
Get-AppxPackage *WebExperience* | Remove-AppxPackage New-Item -Path "HKLM:\Software\Policies\Microsoft\Dsh"
\ No newline at end of file Set-ItemProperty -Path "HKLM:\Software\Policies\Microsoft\Dsh" -Name 'AllowNewsAndInterests' -Value 0 -Type DWord -Force
\ 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