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:
- install
[options]
— Installs the service with the specified options. - uninstall — Uninstalls the service.
- 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>
Specifies the service start type:
2
: Automatic start at system boot.3
: Manual start.4
: Disabled.
Examples:
wiresock-service install -start-type 2
wiresock-service run -start-type 2
-account <account-name>
(Only applicable with the install
command)
Specifies the service account name under which the service will run.
Example:
wiresock-service install -account "NT AUTHORITY\LocalService"
-password <account-password>
(Only applicable with the install
command)
Specifies the password for the service account.
Example:
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:
wiresock-service install -mode nat
wiresock-service run -mode nat
-interface <adapter-name>
Specifies the network interface the service will use.
Example:
wiresock-service install -interface "Ethernet 2"
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:
wiresock-service install -log-level debug
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:
wiresock-service install -dns "4.4.4.4,8.8.4.4"
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:
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 to4.4.4.4
and8.8.4.4
.-log-level none
: Disables logging.
sc start wiresock-service
: Starts the service.
Installing the Service with a Specific Account and Interface
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:
wg-quick-config -add -restart
Gracefully stop the WireGuard tunnel, ensuring a secure closure of your VPN connection.
wg-quick-config -stop
Initiate the WireGuard tunnel, establishing your secure VPN connection swiftly.
wg-quick-config -start
Generate a QR code for the first client, simplifying the process of connecting mobile devices.
wg-quick-config -qrcode 1