Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
windows-vm
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pem
windows-vm
Commits
6ab53c8f
Commit
6ab53c8f
authored
Apr 28, 2025
by
César Galvis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: solved issue with pac server and added security improvements
parent
ed2091b5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
5 deletions
+14
-5
Vagrantfile
Vagrantfile
+6
-0
ssh-connection-private-key.sh
src/scripts/bash/ssh-connection-private-key.sh
+2
-1
ssh-tunnel-private-key.sh
src/scripts/bash/ssh-tunnel-private-key.sh
+2
-1
PacInstall.ps1
src/scripts/ps/PacInstall.ps1
+1
-1
WindowsSettings.ps1
src/scripts/ps/WindowsSettings.ps1
+3
-2
No files found.
Vagrantfile
View file @
6ab53c8f
...
...
@@ -35,7 +35,13 @@ Vagrant.configure("2") do |config|
## Set up proxy
config
.
vm
.
provision
"file"
,
source:
"./src/config/squid-proxy.conf"
,
destination:
"C:/Squid/etc/squid/squid.conf"
## 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"
## Enable UAC
config
.
vm
.
provision
"shell"
,
inline:
<<-
'SHELL'
Write-Output "=== Enable UAC ==="
Set-ItemProperty -Path "HKLM:
\S
OFTWARE
\M
icrosoft
\W
indows
\C
urrentVersion
\P
olicies
\S
ystem" -Name "ConsentPromptBehaviorAdmin" -Value 2
SHELL
## Restart machine
config
.
vm
.
provision
:shell
do
|
shell
|
shell
.
privileged
=
true
...
...
src/scripts/bash/ssh-connection-private-key.sh
View file @
6ab53c8f
...
...
@@ -9,7 +9,7 @@ PROXY_PORT=3128
SSH_SERVER
=
domain.com
SSH_USER
=
user
SSH_PORT
=
22
SSH_PRIVATE_KEY
=
key
SSH_PRIVATE_KEY
=
key
.pem
# 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
"
\ No newline at end of file
src/scripts/bash/ssh-tunnel-private-key.sh
View file @
6ab53c8f
...
...
@@ -11,7 +11,7 @@ SSH_USER=user
SSH_PORT
=
22
SSH_TUNNEL_LOCAL_PORT
=
80
SSH_TUNNEL_REMOTE_PORT
=
80
SSH_PRIVATE_KEY
=
key
SSH_PRIVATE_KEY
=
key
.pem
# 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
\ No newline at end of file
src/scripts/ps/PacInstall.ps1
View file @
6ab53c8f
...
...
@@ -5,7 +5,7 @@ Set-ExecutionPolicy Bypass -Force
# Variables
$taskName
=
"StartPACServer"
$proxyScriptPath
=
"C:\\
vagrant\src\scripts\p
s\PacServer.ps1"
$proxyScriptPath
=
"C:\\
file
s\PacServer.ps1"
# Check if the scheduled task already exists
if
(
Get-ScheduledTask
-TaskName
$taskName
-ErrorAction SilentlyContinue
)
{
...
...
src/scripts/ps/WindowsSettings.ps1
View file @
6ab53c8f
...
...
@@ -37,4 +37,5 @@ Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Search"
## Remove task view
Set-ItemProperty
-Path
"HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
-Name
"ShowTaskViewButton"
-Value 0 -Force
## Remove widgets
Get-AppxPackage
*
WebExperience
*
|
Remove-AppxPackage
\ No newline at end of file
New-Item
-Path
"HKLM:\Software\Policies\Microsoft\Dsh"
Set-ItemProperty
-Path
"HKLM:\Software\Policies\Microsoft\Dsh"
-Name
'AllowNewsAndInterests'
-Value 0 -Type DWord -Force
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment