Wireguard & SMB

Client

Quelle: https://www.howtoforge.de/

apt install resolvconf wireguard-tools
nano /etc/wireguard/client.conf
wg-quick up client [_*OHNE*_ .conf]
wg show
wg-quick down client


sudo nano /etc/wireguard/wg-client0.conf

[Interface]
Address = 10.10.10.2/24
DNS = 10.10.10.1
PrivateKey = cOFA+x5UvHF+a3xJ6enLatG+DoE3I5PhMgKrMKkUyXI=

[Peer]
PublicKey = kQvxOJI5Km4S1c7WXu2UZFpB8mHGuf3Gz8mmgTIF2U0=
AllowedIPs = 0.0.0.0/0
Endpoint = 12.34.56.78:51820
PersistentKeepalive = 25

Where:

  • Address: Specify the private IP address of the VPN client.
  • DNS: specify 10.10.10.1 (the VPN server) as the DNS server. It will be configured via the resolvconf command. You can also specify multiple DNS servers for redundancy like this: DNS = 10.10.10.1 8.8.8.8
  • PrivateKey: The client’s private key, which can be found in the /etc/wireguard/client_private.key file on the client computer.
  • PublicKey: The server’s public key, which can be found in the /etc/wireguard/server_public.key file on the server.
  • AllowedIPs: 0.0.0.0/0 represents the whole Internet, which means all traffic to the Internet should be routed via the VPN.
  • Endpoint: The public IP address and port number of VPN server. Replace 12.34.56.78 with your server’s real public IP address.
  • PersistentKeepalive: Send an authenticated empty packet to the peer every 25 seconds to keep the connection alive. If PersistentKeepalive isn’t enabled, the VPN server might not be able to ping the VPN client.

Save and close the file.

Change the file mode so that only root user can read the files.

sudo chmod 600 /etc/wireguard/ -R

Start WireGuard.

sudo systemctl start wg-quick@wg-client0.service

Enable auto-start at system boot time.

sudo systemctl enable wg-quick@wg-client0.service

Check its status:

systemctl status wg-quick@wg-client0.service

Now go to this website: http://icanhazip.com/ to check your public IP address. If everything went well, it should display your VPN server’s public IP address instead of your client computer’s public IP address.

You can also run the following command to get the current public IP address.

curl https://icanhazip.com

Quelle: LinuxBabe

 


SAMBA Client

sudo apt install smbclient -y

\\Debian_server_IP\share1

Quelle: Serverspa

Es ist möglich, diese FAQ zu kommentieren.

Bewertung der FAQ

0 (0 Abstimmungen)