Difference between revisions of "Wg-quick up"

From wikieduonline
Jump to navigation Jump to search
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
+
{{lc}}
 
* <code>[[wg-quick up]] interfacename</code>
 
* <code>[[wg-quick up]] interfacename</code>
 
  [[ip link]] add wg0 type wireguard
 
  [[ip link]] add wg0 type wireguard
  [[wg setconf]] wg [[/dev/fd/]]63
+
  [[wg setconf]] wg0 [[/dev/fd/]]63
 
  ip -4 address add xx.xx.xx.xx/32 dev wg0
 
  ip -4 address add xx.xx.xx.xx/32 dev wg0
 
  [[ip link]] set [[mtu]] 1420 up dev wg-
 
  [[ip link]] set [[mtu]] 1420 up dev wg-
Line 12: Line 12:
 
  [[sysctl]] -q net.ipv4.conf.all.src_valid_mark=1
 
  [[sysctl]] -q net.ipv4.conf.all.src_valid_mark=1
 
  [[iptables-restore]] -n
 
  [[iptables-restore]] -n
 +
 +
wg-quick up eth0
 +
wg-quick: `[[/etc/wireguard/eth0.conf]]' [[does not exist]]
  
  
 
== Related terms ==
 
== Related terms ==
 
* <code>[[systemd-networkd]]</code>
 
* <code>[[systemd-networkd]]</code>
* [[ip route table show all]]
+
* <code>[[ip route show table all]]</code>
 +
* <code>[[wg-quick up]] interfacename</code>
  
 
== See also ==
 
== See also ==

Latest revision as of 16:55, 18 December 2023

ip link add wg0 type wireguard
wg setconf wg0 /dev/fd/63
ip -4 address add xx.xx.xx.xx/32 dev wg0
ip link set mtu 1420 up dev wg-
resolvconf -a tun.wg0 -m 0 -x
wg set wg0 fwmark 5555
ip -4 route add 0.0.0.0/0 dev wg0 table 5555
ip -4 rule add not fwmark 5555 table 5555
ip -4 rule add table main suppress_prefixlength 0
sysctl -q net.ipv4.conf.all.src_valid_mark=1
iptables-restore -n
wg-quick up eth0
wg-quick: `/etc/wireguard/eth0.conf' does not exist


Related terms[edit]

See also[edit]

Advertising: