redhat:other-redhat:wireguard-redhat

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
redhat:other-redhat:wireguard-redhat [2019/04/10 08:58] – [Install VPN-Server on CentOS 7.x] michaelredhat:other-redhat:wireguard-redhat [2020/01/31 22:56] (current) michael
Line 10: Line 10:
  
  
-===== Install VPN-Server on CentOS 7.x =====+===== Install VPN-Server on CentOS 7 / 8 =====
  
 ''<wrap hi>For the **Debian** installation Tutorial klick **[[debian:other-debian:wireguard-debian|here]]**</wrap>'' ''<wrap hi>For the **Debian** installation Tutorial klick **[[debian:other-debian:wireguard-debian|here]]**</wrap>''
Line 23: Line 23:
 </WRAP> </WRAP>
  
 +<wrap em>For CentOS 7 ONLY:</wrap>
 <code> <code>
 +# yum install epel-release
 # curl -Lo /etc/yum.repos.d/wireguard.repo https://copr.fedorainfracloud.org/coprs/jdoss/wireguard/repo/epel-7/jdoss-wireguard-epel-7.repo # curl -Lo /etc/yum.repos.d/wireguard.repo https://copr.fedorainfracloud.org/coprs/jdoss/wireguard/repo/epel-7/jdoss-wireguard-epel-7.repo
- 
 # yum update # yum update
 +
 # yum install wireguard-dkms wireguard-tools # yum install wireguard-dkms wireguard-tools
 +</code>
 +
 +<wrap em>For CentOS 8 ONLY:</wrap>
 +<code>
 +# yum install epel-release
 +# yum config-manager --set-enabled PowerTools
 +# yum copr enable jdoss/wireguard
 +
 +# yum install wireguard-dkms wireguard-tools
 +</code>
 +
 +<wrap em>continue here:</wrap>
 +<code>
 # mkdir /etc/wireguard && cd /etc/wireguard/ # mkdir /etc/wireguard && cd /etc/wireguard/
  
Line 60: Line 75:
 <WRAP center box 100%> <WRAP center box 100%>
 <code> <code>
-vim /etc/sysctl.d/99-sysctl.conf+echo "net.ipv4.ip_forward=1" >> /etc/sysctl.d/99-sysctl.conf 
 +# echo "net.ipv4.conf.all.forwarding=1" >> /etc/sysctl.d/99-sysctl.conf 
 +# echo "net.ipv6.conf.all.forwarding=1" >> /etc/sysctl.d/99-sysctl.conf 
 + 
 +# cat /etc/sysctl.d/99-sysctl.conf
 </code> </code>
  
-<sxh bash; highlight: [11]>+<sxh bash; highlight: [11-13]>
 # sysctl settings are defined through files in # sysctl settings are defined through files in
 # /usr/lib/sysctl.d/, /run/sysctl.d/, and /etc/sysctl.d/. # /usr/lib/sysctl.d/, /run/sysctl.d/, and /etc/sysctl.d/.
Line 75: Line 94:
 # For more information, see sysctl.conf(5) and sysctl.d(5). # For more information, see sysctl.conf(5) and sysctl.d(5).
 net.ipv4.ip_forward=1 net.ipv4.ip_forward=1
 +net.ipv4.conf.all.forwarding=1
 +net.ipv6.conf.all.forwarding=1
 </sxh> </sxh>
 </WRAP> </WRAP>
Line 83: Line 104:
 # systemctl enable wg-quick@wg0.service # systemctl enable wg-quick@wg0.service
 </code> </code>
 +
 +<WRAP center round important 100%>
 +''Setup POSTROUTING, do this ONLY if you don't want to setup routing!
 +''
 +<code>
 +# firewall-cmd --permanent --direct --add-rule ipv4 nat POSTROUTING 0 -s 192.168.100.0/24 ! -d 192.168.100.0/24 -j SNAT --to 192.168.1.8
 +# firewall-cmd --reload
 +</code>
 +</WRAP>
 +
  
 <WRAP center box 100%> <WRAP center box 100%>
Line 127: Line 158:
 ==== Fritzbox - Routing Konfigurieren ==== ==== Fritzbox - Routing Konfigurieren ====
  
-<wrap em>Nur falls kein Masquarading als Inrtface Forewarding eingesetzt wird. (So wie in diesem Tutorial)</wrap>+<wrap em>Nur falls kein POSTROUTING als Interface Forewarding eingesetzt wird. (So wie in diesem Tutorial)</wrap>
  
  
Line 145: Line 176:
  
  
----- 
  
 ===== Connect Android Smartpone with VPN ===== ===== Connect Android Smartpone with VPN =====
Line 183: Line 213:
   - **Connect & Test:**   - **Connect & Test:**
  
----- 
  
 ===== Connect Windows PC with VPN ===== ===== Connect Windows PC with VPN =====
Line 226: Line 255:
   - **Connect & Test:**   - **Connect & Test:**
  
 +----
 +
 +===== Weiteres =====
  
 +  * [[hardware-section:entwicklerboards:wlan-wireguard-access-point|Use Raspberry Pi as WiFi AP and route traffic through Wireguard (port 53)]]
  
  • redhat/other-redhat/wireguard-redhat.1554879511.txt.gz
  • Last modified: 2019/04/10 08:58
  • by michael