e05e633014
On some systems like Hetzner VM cloud i have a Point-to-Point interface so i have a peer address on the same line as my public IPv4 (look at peer here : https://linux.die.net/man/8/ip ) An example of `ip a` with peer is : ``` 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether 96:00:00:a2:88:c2 brd ff:ff:ff:ff:ff:ff altname enp0s3 inet XX.XX.XX.XX peer XX.XX.XX.XX/32 brd XX.XX.XX.XX scope global eth0 valid_lft forever preferred_lft forever inet6 fe80::9400:ff:fea2:88c2/64 scope link valid_lft forever preferred_lft forever ``` With a peer, the output of the command line 74 is : `XX.XX.XX.XX peer XX.XX.XX.XX` I just modify this line with awk to print only the first field which is always the IPv4. I think it's correct and it's work like a charm when there is a peer or not now. But tell me if it's not good for you :) Thanks for your work ! |
||
---|---|---|
.github | ||
LICENSE | ||
README.md | ||
wireguard-install.sh |
WireGuard installer
This project is a bash script that aims to setup a WireGuard VPN on a Linux server, as easily as possible!
WireGuard is a point-to-point VPN that can be used in different ways. Here, we mean a VPN as in: the client will forward all its traffic trough an encrypted tunnel to the server. The server will apply NAT to the client's traffic so it will appear as if the client is browsing the web with the server's IP.
The script supports both IPv4 and IPv6. Please check the issues for ongoing development, bugs and planned features!
WireGuard does not fit your environment? Check out openvpn-install.
Requirements
Supported distributions:
- Ubuntu >= 16.04
- Debian >= 10
- Fedora
- CentOS
- Arch Linux
Usage
Download and execute the script. Answer the questions asked by the script and it will take care of the rest.
curl -O https://raw.githubusercontent.com/angristan/wireguard-install/master/wireguard-install.sh
chmod +x wireguard-install.sh
./wireguard-install.sh
It will install WireGuard (kernel module and tools) on the server, configure it, create a systemd service and a client configuration file.
Run the script again to add or remove clients!
Providers
I recommend these cheap cloud providers for your VPN server:
- Vultr: Worldwide locations, IPv6 support, starting at $3.50/month
- Hetzner: Germany and Finland, IPv6, 20 TB of traffic, starting at €3/month
- Digital Ocean: Worldwide locations, IPv6 support, starting at $5/month
- PulseHeberg: France, unlimited bandwidth, starting at €3/month