{"id":1324,"date":"2022-12-11T13:26:49","date_gmt":"2022-12-11T12:26:49","guid":{"rendered":"https:\/\/apfelcast.com\/?p=1324"},"modified":"2022-12-11T13:26:49","modified_gmt":"2022-12-11T12:26:49","slug":"site-to-site-vpn-einfach-mit-wireguard-einrichten-schritt-fuer-schritt-anleitung","status":"publish","type":"post","link":"https:\/\/it-ion.de\/index.php\/2022\/12\/11\/site-to-site-vpn-einfach-mit-wireguard-einrichten-schritt-fuer-schritt-anleitung\/","title":{"rendered":"Site-to-Site VPN einfach mit WireGuard einrichten! Schritt-f\u00fcr-Schritt Anleitung"},"content":{"rendered":"\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n <div class=\"brlbs-cmpnt-container brlbs-cmpnt-content-blocker brlbs-cmpnt-with-individual-styles\" data-borlabs-cookie-content-blocker-id=\"default\" data-borlabs-cookie-content=\"PGlmcmFtZSB0aXRsZT0iU2l0ZS10by1TaXRlIFZQTiBlaW5mYWNoIG1pdCBXaXJlR3VhcmQgZWlucmljaHRlbiEgU2Nocml0dC1mw7xyLVNjaHJpdHQgQW5sZWl0dW5nIiB3aWR0aD0iNzIwIiBoZWlnaHQ9IjQwNSIgc3JjPSJodHRwczovL3d3dy55b3V0dWJlLmNvbS9lbWJlZC9haWFicm5IajZfbz9mZWF0dXJlPW9lbWJlZCIgZnJhbWVib3JkZXI9IjAiIGFsbG93PSJhY2NlbGVyb21ldGVyOyBhdXRvcGxheTsgY2xpcGJvYXJkLXdyaXRlOyBlbmNyeXB0ZWQtbWVkaWE7IGd5cm9zY29wZTsgcGljdHVyZS1pbi1waWN0dXJlIiBhbGxvd2Z1bGxzY3JlZW4+PC9pZnJhbWU+\"><div class=\"brlbs-cmpnt-cb-preset-a\"> <p class=\"brlbs-cmpnt-cb-description\">Sie sehen gerade einen Platzhalterinhalt von <strong>Standard<\/strong>. Um auf den eigentlichen Inhalt zuzugreifen, klicken Sie auf die Schaltfl\u00e4che unten. Bitte beachten Sie, dass dabei Daten an Drittanbieter weitergegeben werden.<\/p> <div class=\"brlbs-cmpnt-cb-buttons\"> <a class=\"brlbs-cmpnt-cb-btn\" href=\"#\" data-borlabs-cookie-unblock role=\"button\">Inhalt entsperren<\/a> <a class=\"brlbs-cmpnt-cb-btn\" href=\"#\" data-borlabs-cookie-accept-service role=\"button\" style=\"display: none\">Erforderlichen Service akzeptieren und Inhalte entsperren<\/a> <\/div> <a class=\"brlbs-cmpnt-cb-provider-toggle\" href=\"#\" data-borlabs-cookie-show-provider-information role=\"button\">Mehr Informationen<\/a> <\/div><\/div>\n<\/div><\/figure>\n\n\n\n<p>In diesem Video zeige Ich euch, wie ihr in wenigen Schritten euere eigene Site-to-Site VPN mit Hilfe von WireGuard einrichten k\u00f6nnt. Hierbei spielt es keine Rolle welchen Router bzw. welche Firewall ihr nutzt.<\/p>\n\n\n\n<p>\u00bb AWOW miniPC als VPN-Server:<a href=\"https:\/\/amzn.to\/3FHjmVR\" target=\"_blank\" rel=\"noreferrer noopener\"> https:\/\/amzn.to\/3FHjmVR<\/a><br>\u00bb DynDNS einrichten: <a href=\"https:\/\/cc.apfelcast.com\/8738z\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/cc.apfelcast.com\/8738z<\/a><br>\u00bb WireGuard Playlist: <a href=\"https:\/\/cc.apfelcast.com\/udgzo\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/cc.apfelcast.com\/udgzo<\/a><\/p>\n\n\n\n<div id=\"93964-1\"><script src=\"\/\/ads.themoneytizer.com\/s\/gen.js?type=1\"><\/script><script src=\"\/\/ads.themoneytizer.com\/s\/requestform.js?siteId=93964&amp;formatId=1\"><\/script><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Im Video verwendete Befehle:<\/h3>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">######## Create WireGuard Site-to-Site VPN ######## \n\nexample data:\nsubnet site-1: 192.168.0.0\/24\nsubnet site-2: 192.168.178.0\/24\n\n\n\n--> on site 1 and 2\n## install WireGuard ##\napt install wireguard\n\n## enbale ip forwarding ##\nnano \/etc\/sysctl.conf\n\nuncomment net.ipv4.ip_forward=1\n\n## apply changes ##\nsysctl -p\n\n## generate public and private keys ##\ncd \/etc\/wireguard\numask 077; wg genkey | tee privatekey | wg pubkey > publickey\n\n--> site 1 (server)\n\n## create wg0.conf\n\nnano \/etc\/wireguard\/wg0.conf\n\n[Interface] \nPrivateKey = &lt;site-1 private-key>\nAddress = 10.0.0.1\/24\nSaveConfig = true \nPostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE\nPostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE\nListenPort = 51820\n\n[Peer]\nPublicKey = &lt;site-2 public-key>\nAllowedIPs = 10.0.0.0\/24, 192.168.178.0\/24\nPersistentKeepalive = 25\n\n--> site 2 (client)\n\n## create wg0.conf\n\n[Interface] \nPrivateKey = &lt;site-2 private-key>\nAddress = 10.0.0.3\/24\nSaveConfig = true \nPostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE\nPostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE\n\n[Peer] \nPublicKey = &lt;site-1 public-key>\nEndpoint = &lt;FQDN>:51820 \nAllowedIPs = 10.0.0.0\/24, 192.168.0.0\/24\nPersistentKeepalive = 25\n\n--> on site 1 and 2\n\n## start connection ##\nwg-quick up wg0\n\n## show status ##\nwg show\n\n## enable on system boot ##\nsystemctl enable wg-quick@wg0\n\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>In diesem Video zeige Ich euch, wie ihr in wenigen Schritten euere eigene Site-to-Site VPN&#8230;<\/p>\n","protected":false},"author":1,"featured_media":1326,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"categories":[1],"tags":[],"class_list":["post-1324","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-allgemein"],"taxonomy_info":{"category":[{"value":1,"label":"Allgemein"}]},"featured_image_src_large":["https:\/\/it-ion.de\/wp-content\/uploads\/2022\/12\/maxresdefault-1024x576.jpg",1024,576,true],"author_info":{"display_name":"Daniel Klozb\u00fccher","author_link":"https:\/\/it-ion.de\/index.php\/author\/wp-master\/"},"comment_info":0,"category_info":[{"term_id":1,"name":"Allgemein","slug":"allgemein","term_group":0,"term_taxonomy_id":1,"taxonomy":"category","description":"","parent":0,"count":89,"filter":"raw","cat_ID":1,"category_count":89,"category_description":"","cat_name":"Allgemein","category_nicename":"allgemein","category_parent":0}],"tag_info":false,"_links":{"self":[{"href":"https:\/\/it-ion.de\/index.php\/wp-json\/wp\/v2\/posts\/1324","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/it-ion.de\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/it-ion.de\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/it-ion.de\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/it-ion.de\/index.php\/wp-json\/wp\/v2\/comments?post=1324"}],"version-history":[{"count":0,"href":"https:\/\/it-ion.de\/index.php\/wp-json\/wp\/v2\/posts\/1324\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/it-ion.de\/index.php\/wp-json\/wp\/v2\/media\/1326"}],"wp:attachment":[{"href":"https:\/\/it-ion.de\/index.php\/wp-json\/wp\/v2\/media?parent=1324"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/it-ion.de\/index.php\/wp-json\/wp\/v2\/categories?post=1324"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/it-ion.de\/index.php\/wp-json\/wp\/v2\/tags?post=1324"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}