mirror of
https://github.com/WeeJeWel/wg-easy.git
synced 2024-12-05 08:49:24 +08:00
Merge pull request #500 from joeroback/wireguard_device_parameter
add wireguard device parameter
This commit is contained in:
commit
642d6d62ed
@ -83,6 +83,7 @@ These options can be configured by setting environment variables using `-e KEY="
|
|||||||
| - | - | - | - |
|
| - | - | - | - |
|
||||||
| `PASSWORD` | - | `foobar123` | When set, requires a password when logging in to the Web UI. |
|
| `PASSWORD` | - | `foobar123` | When set, requires a password when logging in to the Web UI. |
|
||||||
| `WG_HOST` | - | `vpn.myserver.com` | The public hostname of your VPN server. |
|
| `WG_HOST` | - | `vpn.myserver.com` | The public hostname of your VPN server. |
|
||||||
|
| `WG_DEVICE` | `eth0` | `ens6f0` | Ethernet device the wireguard traffic should be forwarded through. |
|
||||||
| `WG_PORT` | `51820` | `12345` | The public UDP port of your VPN server. WireGuard will always listen on `51820` inside the Docker container. |
|
| `WG_PORT` | `51820` | `12345` | The public UDP port of your VPN server. WireGuard will always listen on `51820` inside the Docker container. |
|
||||||
| `WG_MTU` | `null` | `1420` | The MTU the clients will use. Server uses default WG MTU. |
|
| `WG_MTU` | `null` | `1420` | The MTU the clients will use. Server uses default WG MTU. |
|
||||||
| `WG_PERSISTENT_KEEPALIVE` | `0` | `25` | Value in seconds to keep the "connection" open. If this value is 0, then connections won't be kept alive. |
|
| `WG_PERSISTENT_KEEPALIVE` | `0` | `25` | Value in seconds to keep the "connection" open. If this value is 0, then connections won't be kept alive. |
|
||||||
|
@ -6,6 +6,7 @@ module.exports.RELEASE = release;
|
|||||||
module.exports.PORT = process.env.PORT || 51821;
|
module.exports.PORT = process.env.PORT || 51821;
|
||||||
module.exports.PASSWORD = process.env.PASSWORD;
|
module.exports.PASSWORD = process.env.PASSWORD;
|
||||||
module.exports.WG_PATH = process.env.WG_PATH || '/etc/wireguard/';
|
module.exports.WG_PATH = process.env.WG_PATH || '/etc/wireguard/';
|
||||||
|
module.exports.WG_DEVICE = process.env.WG_DEVICE || 'eth0';
|
||||||
module.exports.WG_HOST = process.env.WG_HOST;
|
module.exports.WG_HOST = process.env.WG_HOST;
|
||||||
module.exports.WG_PORT = process.env.WG_PORT || 51820;
|
module.exports.WG_PORT = process.env.WG_PORT || 51820;
|
||||||
module.exports.WG_MTU = process.env.WG_MTU || null;
|
module.exports.WG_MTU = process.env.WG_MTU || null;
|
||||||
@ -18,7 +19,7 @@ module.exports.WG_ALLOWED_IPS = process.env.WG_ALLOWED_IPS || '0.0.0.0/0, ::/0';
|
|||||||
|
|
||||||
module.exports.WG_PRE_UP = process.env.WG_PRE_UP || '';
|
module.exports.WG_PRE_UP = process.env.WG_PRE_UP || '';
|
||||||
module.exports.WG_POST_UP = process.env.WG_POST_UP || `
|
module.exports.WG_POST_UP = process.env.WG_POST_UP || `
|
||||||
iptables -t nat -A POSTROUTING -s ${module.exports.WG_DEFAULT_ADDRESS.replace('x', '0')}/24 -o eth0 -j MASQUERADE;
|
iptables -t nat -A POSTROUTING -s ${module.exports.WG_DEFAULT_ADDRESS.replace('x', '0')}/24 -o ${module.exports.WG_DEVICE} -j MASQUERADE;
|
||||||
iptables -A INPUT -p udp -m udp --dport 51820 -j ACCEPT;
|
iptables -A INPUT -p udp -m udp --dport 51820 -j ACCEPT;
|
||||||
iptables -A FORWARD -i wg0 -j ACCEPT;
|
iptables -A FORWARD -i wg0 -j ACCEPT;
|
||||||
iptables -A FORWARD -o wg0 -j ACCEPT;
|
iptables -A FORWARD -o wg0 -j ACCEPT;
|
||||||
|
Loading…
Reference in New Issue
Block a user