Update 'wireguard.sh'
This commit is contained in:
16
wireguard.sh
16
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
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<service>
|
||||
<short>wireguard</short>
|
||||
|
||||
Reference in New Issue
Block a user