Skip to content

WireSock VPN Gateway: Command Line Reference ​

Maximize Your VPN Gateway with Advanced Features and Commands

WIRESOCK-SERVICE ​

You can manage wiresock-service using the following commands:

  1. install [options] — Installs the service with the specified options.
  2. uninstall — Uninstalls the service.
  3. run [options] — Runs the service as a regular process (not as a service), using the specified options.

Below, you can find examples of using these commands and how to execute them with various parameters.

Options of install and run commands ​

Installs the service with the specified options.

-start-type <2..4> (Only applicable with the install command) ​

Specifies the service start type:

  • 2: Automatic start at system boot.
  • 3: Manual start.
  • 4: Disabled.

Examples:

powershell
wiresock-service install -start-type 2

-account <account-name> (Only applicable with the install command) ​

Specifies the service account name under which the service will run.

Example:

powershell
wiresock-service install -account "NT AUTHORITY\LocalService"

-password <account-password> (Only applicable with the install command) ​

Specifies the password for the service account.

Example:

powershell
wiresock-service install -account "MyDomain\ServiceUser" -password "securePassword123"

-mode <nat | proxy> ​

Specifies the gateway mode for the service.

If no mode is specified, the default mode is proxy.

  • proxy: Proxy mode (default). Redirects TCP/UDP connections through the proxy for secure and filtered communication.
  • nat: Network Address Translation mode. Shares the network connection similar to an Internet Gateway.

Example:

To install the service in NAT mode:

powershell
wiresock-service install -mode nat
powershell
wiresock-service run -mode nat

-interface <adapter-name> ​

Specifies the network interface the service will use.

Example:

powershell
wiresock-service install -interface "Ethernet 2"
powershell
wiresock-service run -interface "Ethernet 2"

-log-level <none | info | debug | all> ​

Specifies the logging level.

  • none: No logging.
  • info: Informational messages.
  • debug: Debugging messages.
  • all: All messages.

Example:

powershell
wiresock-service install -log-level debug
powershell
wiresock-service run -log-level debug

-dns "<dns servers>" ​

Specifies the DNS servers to use. Multiple servers should be separated by commas.

If you don't specify any DNS servers, the service will default to using 8.8.8.8 and 1.1.1.1.

Example:

powershell
wiresock-service install -dns "4.4.4.4,8.8.4.4"
powershell
wiresock-service run -dns "4.4.4.4,8.8.4.4"

Example of Usage with Combined Options ​

Here is how you can use wiresock-service with multiple options to customize your VPN gateway setup:

powershell
wiresock-service uninstall

wiresock-service install -start-type 2 -mode nat -interface wiresock -dns "4.4.4.4,8.8.4.4" -log-level none

sc start wiresock-service

Description of the commands:

  • wiresock-service uninstall: Uninstalls the existing service.
  • wiresock-service install: Installs the service with the specified options:
    • -start-type 2: Sets the service to start automatically.
    • -mode nat: Configures the service to operate in NAT mode.
    • -interface wiresock: Specifies the network interface to use.
    • -dns "4.4.4.4,8.8.4.4": Sets the DNS servers to 4.4.4.4 and 8.8.4.4.
    • -log-level none: Disables logging.
  • sc start wiresock-service: Starts the service.
Installing the Service with a Specific Account and Interface ​
sh
wiresock-service install -account "MyDomain\ServiceUser" -password "password123" -interface "Ethernet 1"

WG-QUICK-CONFIG: ​

Add a new peer and restart the WireGuard tunnel for immediate connectivity: ​

powershell
wg-quick-config -add -restart

Gracefully stop the WireGuard tunnel, ensuring a secure closure of your VPN connection. ​

powershell
wg-quick-config -stop

Initiate the WireGuard tunnel, establishing your secure VPN connection swiftly. ​

powershell
wg-quick-config -start

Generate a QR code for the first client, simplifying the process of connecting mobile devices. ​

powershell
wg-quick-config -qrcode 1