{"id":65,"date":"2024-04-17T17:31:16","date_gmt":"2024-04-17T17:31:16","guid":{"rendered":"https:\/\/gratisvps.net\/blog\/?p=65"},"modified":"2024-11-09T02:36:18","modified_gmt":"2024-11-09T02:36:18","slug":"gre-tunnel","status":"publish","type":"post","link":"https:\/\/gratisvps.net\/blog\/gre-tunnel\/","title":{"rendered":"Linux GRE Tunnel: How To Set Up And Configure"},"content":{"rendered":"<blockquote>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_84 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/gratisvps.net\/blog\/gre-tunnel\/#What_is_a_GRE_tunnel_in_networking\" >What is a GRE tunnel in networking?<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/gratisvps.net\/blog\/gre-tunnel\/#Is_a_GRE_tunnel_encrypted\" >Is a GRE tunnel encrypted?<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/gratisvps.net\/blog\/gre-tunnel\/#How_to_set_up_and_configure_a_GRE_tunnel\" >How to set up and configure a GRE tunnel<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/gratisvps.net\/blog\/gre-tunnel\/#GRE_tunnel_setup_on_Host_A\" >GRE tunnel setup on Host A<\/a><ul class='ez-toc-list-level-5' ><li class='ez-toc-heading-level-5'><ul class='ez-toc-list-level-5' ><li class='ez-toc-heading-level-5'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/gratisvps.net\/blog\/gre-tunnel\/#Enabling_IP_forwarding\" >Enabling IP forwarding<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-5'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/gratisvps.net\/blog\/gre-tunnel\/#Creating_the_GRE_tunnel_interface\" >Creating the GRE tunnel interface<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-5'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/gratisvps.net\/blog\/gre-tunnel\/#Setting_up_a_firewall_rule_for_source_NAT\" >Setting up a firewall rule for source NAT<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-5'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/gratisvps.net\/blog\/gre-tunnel\/#Creating_routing_table_rules_for_the_GRE_tunnel_interface\" >Creating routing table rules for the GRE tunnel interface<\/a><\/li><\/ul><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/gratisvps.net\/blog\/gre-tunnel\/#GRE_tunnel_setup_on_Host_B\" >GRE tunnel setup on Host B<\/a><ul class='ez-toc-list-level-5' ><li class='ez-toc-heading-level-5'><ul class='ez-toc-list-level-5' ><li class='ez-toc-heading-level-5'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/gratisvps.net\/blog\/gre-tunnel\/#Enabling_IP_forwarding-2\" >Enabling IP forwarding<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-5'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/gratisvps.net\/blog\/gre-tunnel\/#Creating_the_GRE_tunnel_interface-2\" >Creating the GRE tunnel interface<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-5'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/gratisvps.net\/blog\/gre-tunnel\/#Setting_up_a_firewall_rule_for_source_NAT-2\" >Setting up a firewall rule for source NAT<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-5'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/gratisvps.net\/blog\/gre-tunnel\/#Creating_routing_table_rules_for_the_GRE_tunnel_interface-2\" >Creating routing table rules for the GRE tunnel interface<\/a><\/li><\/ul><\/li><\/ul><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"What_is_a_GRE_tunnel_in_networking\"><\/span>What is a GRE tunnel in networking?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<hr \/>\n<\/blockquote>\n<p>This guide will walk through the setup and configuration of a GRE tunnel between two Linux hosts. The two Linux hosts are running Ubuntu 22.04 LTS.<\/p>\n<p>GRE (Generic Routing Encapsulation) tunnels encapsulate network packets inside new network packets. A virtual link is established between two hosts, allowing the hosts to communicate as if they were directly connected. The Cisco-developed tunneling protocol can encapsulate most protocol packet types.<\/p>\n<h3 id=\"is-a-gre-tunnel-encrypted\"><span class=\"ez-toc-section\" id=\"Is_a_GRE_tunnel_encrypted\"><\/span>Is a GRE tunnel encrypted?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Though a GRE tunnel functions similarly to a VPN, packets traveling inside a GRE tunnel are not encrypted but are instead encapsulated inside a GRE header. You must configure IPSec separately if you want to maintain data confidentiality.<\/p>\n<h2 id=\"how-to-set-up-and-configure-a-gre-tunnel\"><span class=\"ez-toc-section\" id=\"How_to_set_up_and_configure_a_GRE_tunnel\"><\/span>How to set up and configure a GRE tunnel<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Setting up a GRE tunnel naturally requires work on both hosts. You will need to create a tunnel interface on each, set up firewall rules, and create routing tables. For clarity, we&#8217;ll name one host &#8220;Host A&#8221; and the other &#8220;Host B&#8221;.<\/p>\n<h3 id=\"gre-tunnel-setup-on-host-a\"><span class=\"ez-toc-section\" id=\"GRE_tunnel_setup_on_Host_A\"><\/span>GRE tunnel setup on Host A<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<figure id=\"attachment_480\" aria-describedby=\"caption-attachment-480\" style=\"width: 832px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-480 size-full\" src=\"https:\/\/gratisvps.net\/blog\/wp-content\/uploads\/2024\/04\/gre.jpg\" alt=\"GRE Tunnel\" width=\"832\" height=\"448\" srcset=\"https:\/\/gratisvps.net\/blog\/wp-content\/uploads\/2024\/04\/gre.jpg 832w, https:\/\/gratisvps.net\/blog\/wp-content\/uploads\/2024\/04\/gre-300x162.jpg 300w, https:\/\/gratisvps.net\/blog\/wp-content\/uploads\/2024\/04\/gre-768x414.jpg 768w\" sizes=\"auto, (max-width: 832px) 100vw, 832px\" \/><figcaption id=\"caption-attachment-480\" class=\"wp-caption-text\">GRE Tunnel<\/figcaption><\/figure>\n<h5 id=\"enabling-ip-forwarding\"><span class=\"ez-toc-section\" id=\"Enabling_IP_forwarding\"><\/span>Enabling IP forwarding<span class=\"ez-toc-section-end\"><\/span><\/h5>\n<p>The first step is to enable IP port forwarding on our host. Without this the GRE tunnel will not work. This is possible with a single command:<\/p>\n<pre><code>sysctl -w net.ipv4.ip_forward=1<\/code><\/pre>\n<h5 id=\"creating-the-gre-tunnel-interface\"><span class=\"ez-toc-section\" id=\"Creating_the_GRE_tunnel_interface\"><\/span>Creating the GRE tunnel interface<span class=\"ez-toc-section-end\"><\/span><\/h5>\n<p>Now we can create the GRE tunnel interface from Host A to Host B:<\/p>\n<pre><code>ip tunnel add gre1 mode gre remote &lt;HOST_B_IP&gt; local &lt;HOST_A_IP&gt; ttl 25<\/code><\/pre>\n<p>Naturally, you should replace\u00a0<code>&lt;Host_B_IP&gt;<\/code>\u00a0with the IP address of your target server and\u00a0<code>&lt;Host_A_IP&gt;<\/code>\u00a0with the IP address of the machine you are currently connected to. \u00a0If you are a BitLaunch customer, you can quickly check the IP addresses of your servers in your control panel.<\/p>\n<p>Next, we need to assign an IP address to the GRE interface on our host:<\/p>\n<pre><code>ip addr add &lt;HOST_A_PRIV_IP_GRE&gt;\/30 dev gre1<\/code><\/pre>\n<p>You should replace\u00a0<code>&lt;HOST_A_PRIV_IP_GRE&gt;<\/code>\u00a0with an unused private IP, for example:<\/p>\n<pre><code>ip addr add 10.0.0.1\/30 dev gre1<\/code><\/pre>\n<p>Now it&#8217;s a simple matter of activating the GRE interface with the following command:<\/p>\n<pre><code>ip link set dev gre1 up<\/code><\/pre>\n<h5 id=\"setting-up-a-firewall-rule-for-source-nat\"><span class=\"ez-toc-section\" id=\"Setting_up_a_firewall_rule_for_source_NAT\"><\/span>Setting up a firewall rule for source NAT<span class=\"ez-toc-section-end\"><\/span><\/h5>\n<p>We&#8217;ll now add a firewall rule to perform source NAT. This will translate the source IP address of packets leaving our GRE interface into public routable addresses:<\/p>\n<pre><code>iptables -t nat -A POSTROUTING -s &lt;HOST_B_PRIV_IP_GRE&gt; ! -o gre+ -j SNAT --to-source &lt;HOST_A_IP&gt;<\/code><\/pre>\n<pre><code>EXAMPLE:\r\niptables -t nat -A POSTROUTING -s 10.0.0.2 ! -o gre+ -j SNAT --to-source 1.1.1.1<\/code><\/pre>\n<h5 id=\"creating-routing-table-rules-for-the-gre-tunnel-interface\"><span class=\"ez-toc-section\" id=\"Creating_routing_table_rules_for_the_GRE_tunnel_interface\"><\/span>Creating routing table rules for the GRE tunnel interface<span class=\"ez-toc-section-end\"><\/span><\/h5>\n<p>Finally, we can add a custom routing table for the GRE tunnel that will route traffic from the GRE tunnel&#8217;s source IP through the GRE table:<\/p>\n<pre><code>echo '100 GRE' &gt;&gt; \/etc\/iproute2\/rt_tables\r\nip rule add from &lt;HOST_A_PRIV_IP_GRE&gt;\/32 table GRE\r\nip route add default via &lt;HOST_B_PRIV_IP_GRE&gt; table GRE<\/code><\/pre>\n<pre><code>EXAMPLE:\r\necho '100 GRE' &gt;&gt; \/etc\/iproute2\/rt_tables\r\nip rule add from 10.0.0.1\/32 table GRE\r\nip route add default via 10.0.0.2 table GRE<\/code><\/pre>\n<h3 id=\"gre-tunnel-setup-on-host-b\"><span class=\"ez-toc-section\" id=\"GRE_tunnel_setup_on_Host_B\"><\/span>GRE tunnel setup on Host B<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>For host B, the setup is the same, except of course that we must use flip the IP addresses and use a different private IP.<\/p>\n<h5 id=\"enabling-ip-forwarding-1\"><span class=\"ez-toc-section\" id=\"Enabling_IP_forwarding-2\"><\/span>Enabling IP forwarding<span class=\"ez-toc-section-end\"><\/span><\/h5>\n<p>We can set up IP forwarding on Host B with the same command as Host A.<\/p>\n<pre><code>sysctl -w net.ipv4.ip_forward=1<\/code><\/pre>\n<h5 id=\"creating-the-gre-tunnel-interface-1\"><span class=\"ez-toc-section\" id=\"Creating_the_GRE_tunnel_interface-2\"><\/span>Creating the GRE tunnel interface<span class=\"ez-toc-section-end\"><\/span><\/h5>\n<p>Now we can create the GRE tunnel interface from Host B to Host A:<\/p>\n<pre><code class=\"language-bash\">ip tunnel add gre1 mode gre remote &lt;HOST_A_IP&gt; local &lt;HOST_B_IP&gt; ttl 225<\/code><\/pre>\n<p>You should replace\u00a0<code>&lt;Host_A_IP&gt;<\/code>\u00a0with the IP address of your first server and\u00a0<code>&lt;Host_B_IP&gt;<\/code>\u00a0with the IP address of the machine you are currently connected to.<\/p>\n<p>Next, we need to assign an IP address to the <a href=\"https:\/\/www.cloudflare.com\/learning\/network-layer\/what-is-gre-tunneling\/\">GRE<\/a> interface on our host:<\/p>\n<pre><code>ip addr add &lt;HOST_B_PRIV_IP_GRE&gt;\/30 dev gre1<\/code><\/pre>\n<p>You should replace\u00a0<code>&lt;HOST_B_PRIV_IP_GRE&gt;<\/code>\u00a0with an unused private IP, for example:<\/p>\n<pre><code>ip addr add 10.0.0.2\/30 dev gre1<\/code><\/pre>\n<p>Now it&#8217;s a simple matter of activating the GRE interface with the following command:<\/p>\n<pre><code>ip link set dev gre1 up<\/code><\/pre>\n<h5 id=\"setting-up-a-firewall-rule-for-source-nat-1\"><span class=\"ez-toc-section\" id=\"Setting_up_a_firewall_rule_for_source_NAT-2\"><\/span>Setting up a firewall rule for source NAT<span class=\"ez-toc-section-end\"><\/span><\/h5>\n<p>We&#8217;ll now add a firewall rule to perform source NAT. This will translate the source IP address of packets leaving our GRE interface into public routable addresses:<\/p>\n<pre><code>iptables -t nat -A POSTROUTING -s &lt;HOST_B_PRIV_IP_GRE&gt; ! -o gre+ -j SNAT --to-source &lt;HOST_B_IP&gt;<\/code><\/pre>\n<pre><code>EXAMPLE:\r\niptables -t nat -A POSTROUTING -s 10.0.0.1 ! -o gre+ -j SNAT --to-source 2.2.2.2<\/code><\/pre>\n<h5 id=\"creating-routing-table-rules-for-the-gre-tunnel-interface-1\"><span class=\"ez-toc-section\" id=\"Creating_routing_table_rules_for_the_GRE_tunnel_interface-2\"><\/span>Creating routing table rules for the GRE tunnel interface<span class=\"ez-toc-section-end\"><\/span><\/h5>\n<p>Finally, we can add a custom routing table for the GRE tunnel that will route traffic from the\u00a0 tunnel&#8217;s source IP through the GRE table:<\/p>\n<pre><code>echo '100 GRE' &gt;&gt; \/etc\/iproute2\/rt_tables\r\nip rule add from &lt;HOST_B_PRIV_IP_GRE&gt;\/32 table GRE\r\nip route add default via &lt;HOST_A_PRIV_IP_GRE&gt; table GRE<\/code><\/pre>\n<pre><code>EXAMPLE:<\/code><\/pre>\n<pre><code>echo '100 GRE' &gt;&gt; \/etc\/iproute2\/rt_tables\r\nip rule add from 10.0.0.2\/32 table GRE\r\nip route add default via 10.0.0.1 table GRE<\/code><\/pre>\n<p>That&#8217;s it! Your GRE tunnel should now be working. Remember, do not send any sensitive data via the tunnel without first setting up IPSec.<\/p>\n<blockquote><p>Need an\u00a0<a href=\"https:\/\/gratisvps.net\">anonymous VPS<\/a>\u00a0to host your GRE tunnel on?\u00a0<a href=\"https:\/\/gratisvps.net\">Sign up<\/a> to GratisVPS today.<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>What is a GRE tunnel in networking? This guide will walk through the setup and configuration of a GRE tunnel [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":66,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[138,2],"tags":[30,7],"class_list":["post-65","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-gre-tunnel","category-linux","tag-gre-tunnel","tag-how-to"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.4 (Yoast SEO v27.7) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Linux GRE Tunnel: How To Set Up And Configure<\/title>\n<meta name=\"description\" content=\"GRE Tunnel (Generic Routing Encapsulation) tunnels encapsulate network packets inside new network packets.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/gratisvps.net\/blog\/gre-tunnel\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Linux GRE Tunnel: How To Set Up And Configure\" \/>\n<meta property=\"og:description\" content=\"GRE Tunnel (Generic Routing Encapsulation) tunnels encapsulate network packets inside new network packets.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/gratisvps.net\/blog\/gre-tunnel\/\" \/>\n<meta property=\"og:site_name\" content=\"Free VPS Hosting Guides\" \/>\n<meta property=\"article:published_time\" content=\"2024-04-17T17:31:16+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-11-09T02:36:18+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/gratisvps.net\/blog\/wp-content\/uploads\/2024\/04\/gre-tunnel-setup.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"1080\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"ariete\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"ariete\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":[\"Article\",\"BlogPosting\"],\"@id\":\"https:\\\/\\\/gratisvps.net\\\/blog\\\/gre-tunnel\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/gratisvps.net\\\/blog\\\/gre-tunnel\\\/\"},\"author\":{\"name\":\"ariete\",\"@id\":\"https:\\\/\\\/gratisvps.net\\\/blog\\\/#\\\/schema\\\/person\\\/cddcf8cb5192d0713c19b79425c77fc4\"},\"headline\":\"Linux GRE Tunnel: How To Set Up And Configure\",\"datePublished\":\"2024-04-17T17:31:16+00:00\",\"dateModified\":\"2024-11-09T02:36:18+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/gratisvps.net\\\/blog\\\/gre-tunnel\\\/\"},\"wordCount\":642,\"publisher\":{\"@id\":\"https:\\\/\\\/gratisvps.net\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/gratisvps.net\\\/blog\\\/gre-tunnel\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/gratisvps.net\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/04\\\/gre-tunnel-setup.jpg\",\"keywords\":[\"GRE tunnel\",\"how to\"],\"articleSection\":[\"GRE Tunnel\",\"Linux\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/gratisvps.net\\\/blog\\\/gre-tunnel\\\/\",\"url\":\"https:\\\/\\\/gratisvps.net\\\/blog\\\/gre-tunnel\\\/\",\"name\":\"Linux GRE Tunnel: How To Set Up And Configure\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/gratisvps.net\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/gratisvps.net\\\/blog\\\/gre-tunnel\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/gratisvps.net\\\/blog\\\/gre-tunnel\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/gratisvps.net\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/04\\\/gre-tunnel-setup.jpg\",\"datePublished\":\"2024-04-17T17:31:16+00:00\",\"dateModified\":\"2024-11-09T02:36:18+00:00\",\"description\":\"GRE Tunnel (Generic Routing Encapsulation) tunnels encapsulate network packets inside new network packets.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/gratisvps.net\\\/blog\\\/gre-tunnel\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/gratisvps.net\\\/blog\\\/gre-tunnel\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/gratisvps.net\\\/blog\\\/gre-tunnel\\\/#primaryimage\",\"url\":\"https:\\\/\\\/gratisvps.net\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/04\\\/gre-tunnel-setup.jpg\",\"contentUrl\":\"https:\\\/\\\/gratisvps.net\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/04\\\/gre-tunnel-setup.jpg\",\"width\":1920,\"height\":1080},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/gratisvps.net\\\/blog\\\/gre-tunnel\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/gratisvps.net\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Linux GRE Tunnel: How To Set Up And Configure\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/gratisvps.net\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/gratisvps.net\\\/blog\\\/\",\"name\":\"Gratisvps.net | Blog Daily Tech Info\",\"description\":\"GratisVPS.NET\",\"publisher\":{\"@id\":\"https:\\\/\\\/gratisvps.net\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/gratisvps.net\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/gratisvps.net\\\/blog\\\/#organization\",\"name\":\"Gratisvps.net | Blog Daily Tech Info\",\"url\":\"https:\\\/\\\/gratisvps.net\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/gratisvps.net\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/gratisvps.net\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/10\\\/logo.png\",\"contentUrl\":\"https:\\\/\\\/gratisvps.net\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/10\\\/logo.png\",\"width\":250,\"height\":67,\"caption\":\"Gratisvps.net | Blog Daily Tech Info\"},\"image\":{\"@id\":\"https:\\\/\\\/gratisvps.net\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/gratisvps.net\\\/blog\\\/#\\\/schema\\\/person\\\/cddcf8cb5192d0713c19b79425c77fc4\",\"name\":\"ariete\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b93881052caa63fd6b2fb5468a80afcf9f985a165c6d4de11a72cc4c0775f74a?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b93881052caa63fd6b2fb5468a80afcf9f985a165c6d4de11a72cc4c0775f74a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b93881052caa63fd6b2fb5468a80afcf9f985a165c6d4de11a72cc4c0775f74a?s=96&d=mm&r=g\",\"caption\":\"ariete\"},\"sameAs\":[\"https:\\\/\\\/gratisvps.net\\\/blog\"],\"url\":\"https:\\\/\\\/gratisvps.net\\\/blog\\\/author\\\/ariete\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Linux GRE Tunnel: How To Set Up And Configure","description":"GRE Tunnel (Generic Routing Encapsulation) tunnels encapsulate network packets inside new network packets.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/gratisvps.net\/blog\/gre-tunnel\/","og_locale":"en_US","og_type":"article","og_title":"Linux GRE Tunnel: How To Set Up And Configure","og_description":"GRE Tunnel (Generic Routing Encapsulation) tunnels encapsulate network packets inside new network packets.","og_url":"https:\/\/gratisvps.net\/blog\/gre-tunnel\/","og_site_name":"Free VPS Hosting Guides","article_published_time":"2024-04-17T17:31:16+00:00","article_modified_time":"2024-11-09T02:36:18+00:00","og_image":[{"width":1920,"height":1080,"url":"https:\/\/gratisvps.net\/blog\/wp-content\/uploads\/2024\/04\/gre-tunnel-setup.jpg","type":"image\/jpeg"}],"author":"ariete","twitter_card":"summary_large_image","twitter_misc":{"Written by":"ariete","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":["Article","BlogPosting"],"@id":"https:\/\/gratisvps.net\/blog\/gre-tunnel\/#article","isPartOf":{"@id":"https:\/\/gratisvps.net\/blog\/gre-tunnel\/"},"author":{"name":"ariete","@id":"https:\/\/gratisvps.net\/blog\/#\/schema\/person\/cddcf8cb5192d0713c19b79425c77fc4"},"headline":"Linux GRE Tunnel: How To Set Up And Configure","datePublished":"2024-04-17T17:31:16+00:00","dateModified":"2024-11-09T02:36:18+00:00","mainEntityOfPage":{"@id":"https:\/\/gratisvps.net\/blog\/gre-tunnel\/"},"wordCount":642,"publisher":{"@id":"https:\/\/gratisvps.net\/blog\/#organization"},"image":{"@id":"https:\/\/gratisvps.net\/blog\/gre-tunnel\/#primaryimage"},"thumbnailUrl":"https:\/\/gratisvps.net\/blog\/wp-content\/uploads\/2024\/04\/gre-tunnel-setup.jpg","keywords":["GRE tunnel","how to"],"articleSection":["GRE Tunnel","Linux"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/gratisvps.net\/blog\/gre-tunnel\/","url":"https:\/\/gratisvps.net\/blog\/gre-tunnel\/","name":"Linux GRE Tunnel: How To Set Up And Configure","isPartOf":{"@id":"https:\/\/gratisvps.net\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/gratisvps.net\/blog\/gre-tunnel\/#primaryimage"},"image":{"@id":"https:\/\/gratisvps.net\/blog\/gre-tunnel\/#primaryimage"},"thumbnailUrl":"https:\/\/gratisvps.net\/blog\/wp-content\/uploads\/2024\/04\/gre-tunnel-setup.jpg","datePublished":"2024-04-17T17:31:16+00:00","dateModified":"2024-11-09T02:36:18+00:00","description":"GRE Tunnel (Generic Routing Encapsulation) tunnels encapsulate network packets inside new network packets.","breadcrumb":{"@id":"https:\/\/gratisvps.net\/blog\/gre-tunnel\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/gratisvps.net\/blog\/gre-tunnel\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/gratisvps.net\/blog\/gre-tunnel\/#primaryimage","url":"https:\/\/gratisvps.net\/blog\/wp-content\/uploads\/2024\/04\/gre-tunnel-setup.jpg","contentUrl":"https:\/\/gratisvps.net\/blog\/wp-content\/uploads\/2024\/04\/gre-tunnel-setup.jpg","width":1920,"height":1080},{"@type":"BreadcrumbList","@id":"https:\/\/gratisvps.net\/blog\/gre-tunnel\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/gratisvps.net\/blog\/"},{"@type":"ListItem","position":2,"name":"Linux GRE Tunnel: How To Set Up And Configure"}]},{"@type":"WebSite","@id":"https:\/\/gratisvps.net\/blog\/#website","url":"https:\/\/gratisvps.net\/blog\/","name":"Gratisvps.net | Blog Daily Tech Info","description":"GratisVPS.NET","publisher":{"@id":"https:\/\/gratisvps.net\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/gratisvps.net\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/gratisvps.net\/blog\/#organization","name":"Gratisvps.net | Blog Daily Tech Info","url":"https:\/\/gratisvps.net\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/gratisvps.net\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/gratisvps.net\/blog\/wp-content\/uploads\/2024\/10\/logo.png","contentUrl":"https:\/\/gratisvps.net\/blog\/wp-content\/uploads\/2024\/10\/logo.png","width":250,"height":67,"caption":"Gratisvps.net | Blog Daily Tech Info"},"image":{"@id":"https:\/\/gratisvps.net\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/gratisvps.net\/blog\/#\/schema\/person\/cddcf8cb5192d0713c19b79425c77fc4","name":"ariete","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/b93881052caa63fd6b2fb5468a80afcf9f985a165c6d4de11a72cc4c0775f74a?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/b93881052caa63fd6b2fb5468a80afcf9f985a165c6d4de11a72cc4c0775f74a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b93881052caa63fd6b2fb5468a80afcf9f985a165c6d4de11a72cc4c0775f74a?s=96&d=mm&r=g","caption":"ariete"},"sameAs":["https:\/\/gratisvps.net\/blog"],"url":"https:\/\/gratisvps.net\/blog\/author\/ariete\/"}]}},"_links":{"self":[{"href":"https:\/\/gratisvps.net\/blog\/wp-json\/wp\/v2\/posts\/65","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gratisvps.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gratisvps.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gratisvps.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gratisvps.net\/blog\/wp-json\/wp\/v2\/comments?post=65"}],"version-history":[{"count":4,"href":"https:\/\/gratisvps.net\/blog\/wp-json\/wp\/v2\/posts\/65\/revisions"}],"predecessor-version":[{"id":481,"href":"https:\/\/gratisvps.net\/blog\/wp-json\/wp\/v2\/posts\/65\/revisions\/481"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/gratisvps.net\/blog\/wp-json\/wp\/v2\/media\/66"}],"wp:attachment":[{"href":"https:\/\/gratisvps.net\/blog\/wp-json\/wp\/v2\/media?parent=65"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gratisvps.net\/blog\/wp-json\/wp\/v2\/categories?post=65"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gratisvps.net\/blog\/wp-json\/wp\/v2\/tags?post=65"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}