VPN Project

Steps

Edge Firewall Rules

set firewall name WAN-to-DMZ rule 30 action 'accept'
set firewall name WAN-to-DMZ rule 30 description 'Port Forward Wireguard from jump'
set firewall name WAN-to-DMZ rule 30 destination address '172.16.50.4'
set firewall name WAN-to-DMZ rule 30 destination port '51820'
set firewall name WAN-to-DMZ rule 30 protocol 'udp'

set nat destination rule 30 destination port 51820
set nat destination rule 30 inbound-interface eth0
set nat destination rule 30 protocol udp
set nat destination rule 30 translation address 172.16.50.4
set nat destination rule 30 translation port 51820
set nat destination rule 30 description 'Port Forward Wireguard from jump'

Rule 999 to allow jump to talk with the internet

set firewall name DMZ-to-WAN rule 999 action accept
set firewall name DMZ-to-WAN rule 999 source address 172.16.50.4

Note: delete this after the script is run

Script usage

Download script:

Script:

Note: You will need to change the endpoint to contain your public ip

Make Script Executable:

Note: Before running the script take not of which ethernet adapter you want to use. As you can see below mine is ens160.

Run the script:

You will be prompted for the adapter just put it in as it reads in the `ip a` for example mine was ens160 so I would just put ens160.

Once the script is done you will have a client config and the wg0.conf. We want to get that client config over to the client.

Client Setup:

I just use the msi install: https://download.wireguard.com/windows-client/

Now once you have the client config on the client machine.

Now open wiregaurd and press `Add Tunnel` in the bottom left. Then navigate the your client config.

Note: If you see Latest Handshake then you have an active connection to the server. For an extra test you can ping the gateway IP of your vpn network.

Last updated