Update 'wireguard.sh'

This commit is contained in:
2020-06-05 11:59:42 -04:00
parent 3e2caeec04
commit ddf4d57f2d

View File

@@ -2,14 +2,20 @@
# install wireguard as the VPN server
# install wireguard
sudo curl -Lo /etc/yum.repos.d/wireguard.repo https://copr.fedorainfracloud.org/coprs/jdoss/wireguard/repo/epel-7/jdoss-wireguard-epel-7.repo
sudo yum install epel-release
sudo yum install wireguard-dkms wireguard-tools
dnf install elrepo-release epel-release
dnf install kmod-wireguard wireguard-tools
# setup port forwarding
echo 1 > /proc/sys/net/ipv4/ip_forward
cat << EOF >> /etc/systctl.d/99-custom.conf
# IPv4 Forwarding
net.ipv4.ip_forward = 1
# IPv6 Forwarding
#net.ipv6.conf.all.forwarding = 1
EOF
cat << EOF >> /etc/firewalld/services/wireguard.xml
sysctl -p /etc/sysctl.d/99-custom.conf
cat << EOF >> /etc/firewalld/services/wireguard.xml
<?xml version="1.0" encoding="utf-8"?>
<service>
<short>wireguard</short>