diff --git a/wireguard.sh b/wireguard.sh index 8347986..b2b4ec5 100644 --- a/wireguard.sh +++ b/wireguard.sh @@ -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 wireguard