{"id":5614,"date":"2019-11-29T03:51:46","date_gmt":"2019-11-29T03:51:46","guid":{"rendered":"https:\/\/www.hostinger.com\/tutorials\/?p=5614"},"modified":"2024-11-20T14:11:35","modified_gmt":"2024-11-20T14:11:35","slug":"iptables-tutorial","status":"publish","type":"post","link":"\/my\/tutorials\/iptables-tutorial","title":{"rendered":"Iptables tutorial: securing VPS with Linux firewall"},"content":{"rendered":"<p>Are you looking for a comprehensive iptables tutorial for your VPS? This article will show you how to install and use iptables on an Ubuntu system. <\/p><p>Follow along and learn how to secure your VPS with the command-line interface and a Linux firewall tool.<\/p><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"https:\/\/assets.hostinger.com\/content\/tutorials\/pdf\/Linux-Commands-Cheat-Sheet.pdf\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" width=\"1024\" height=\"283\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2022\/11\/Linux-cheat-sheet-1024x283.png\" alt=\"\" class=\"wp-image-69262\" srcset=\"https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2022\/11\/Linux-cheat-sheet-1536x425.png 1024w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2022\/11\/Linux-cheat-sheet-300x83.png 300w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2022\/11\/Linux-cheat-sheet-150x41.png 150w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2022\/11\/Linux-cheat-sheet-768x212.png 768w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2022\/11\/Linux-cheat-sheet.png 2048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><\/div><p>\n\n\n\n\n<div class=\"protip\">\n                    <h2 class=\"featured-snippet title\">What Is Iptables?<\/h2>\n                    <p><br>\nIptables is a firewall program for Linux. It will monitor traffic from and to your server using tables. These tables contain sets of rules, called chains, that will filter incoming and outgoing data packets.<\/p>\n                <\/div>\n\n\n\n<\/p><h3 class=\"wp-block-heading\" id=\"h-how-does-iptables-work\">How does iptables work?<\/h3><p>When a <strong>packet<\/strong> matches a <strong>rule<\/strong>, it is given a <strong>target<\/strong>, which can be another chain or one of these special values:<\/p><ul class=\"wp-block-list\">\n<li><strong>ACCEPT<\/strong> &ndash; will allow the packet to pass through.<\/li>\n\n\n\n<li><strong>DROP<\/strong> &ndash; will not let the packet pass through.<\/li>\n\n\n\n<li><strong>RETURN<\/strong> &ndash; stops the packet from traversing through a chain and tell it to go back to the previous chain.<\/li>\n<\/ul><p>In this iptables tutorial, we are going to work with one of the default tables, called <strong>filter<\/strong>. It consists of three chains:<\/p><ul class=\"wp-block-list\">\n<li><strong>INPUT<\/strong> &ndash;&nbsp; controls incoming packets to the server.<\/li>\n\n\n\n<li><strong>FORWARD<\/strong> &ndash; filters incoming packets that will be forwarded somewhere else.<\/li>\n\n\n\n<li><strong>OUTPUT<\/strong> &ndash; filter packets that are going out from your server.<\/li>\n<\/ul><p>Before we begin this guide, make sure you have SSH <strong>root<\/strong> or <strong>sudo<\/strong> access to your machine that runs on Ubuntu 22.04 or up. You can establish the connection through PuTTY (Windows) or terminal shell (Linux, macOS). If you own a <a href=\"\/my\/vps-hosting\">Hostinger VPS<\/a> plan, you can get the SSH login details on the Servers tab of hPanel.<\/p><p>\n\n\n<div><p class=\"important\"><b>Important!<\/b> Iptables rules only apply to<strong> ipv4<\/strong>. If you want to set up a firewall for the <strong>ipv6<\/strong> protocol, you will need to use <strong>ip6tables<\/strong> instead. <\/p><\/div>\n\n\n\n<\/p><h2 class=\"wp-block-heading\" id=\"h-how-to-install-and-use-iptables-linux-firewall\">How to install and use iptables Linux firewall<\/h2><p>We will divide this iptables tutorial into three steps. First, you will learn how to install the tool on Ubuntu. Second, we are going to show you how to define the rules. Lastly, we&rsquo;ll go over how to make persistent changes in iptables.<\/p><h3 class=\"wp-block-heading\" id=\"h-1-install-iptables\">1. Install iptables<\/h3><p>Iptables comes pre-installed in most <a href=\"\/my\/tutorials\/best-linux-distro\">Linux distributions<\/a>. However, if you don&rsquo;t have it in your Ubuntu\/Debian system by default, follow the steps below:<\/p><ol class=\"wp-block-list\">\n<li>Connect to your server via SSH. If you&rsquo;re not sure how to do it, read our <a href=\"\/my\/tutorials\/how-to-use-putty-ssh\">SSH tutorial<\/a>.<\/li>\n\n\n\n<li>Execute the following commands one by one: <pre>sudo apt-get update<br>sudo apt-get install iptables<\/pre><\/li>\n\n\n\n<li>Check the status of your current iptables configuration by running: <pre>sudo iptables -L -v<\/pre> <p>Here, the<strong> -L<\/strong> option is used to list all the rules, and <strong>-v<\/strong>&nbsp;is for showing the info in a more detailed format. Below is an example output:<\/p> <pre>Chain INPUT (policy ACCEPT 0 packets, 0 bytes)<br>pkts bytes target &nbsp; &nbsp; prot opt in out &nbsp; source destination<br><br>Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)<br>pkts bytes target &nbsp; &nbsp; prot opt in out &nbsp; source destination<br><br>Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)<br>pkts bytes target &nbsp; &nbsp; prot opt in out &nbsp; source destination<\/pre><\/li>\n<\/ol><p>You will now have the Linux iptables firewall installed. At this point, you will notice that all chains are set to <strong>ACCEPT<\/strong> and have no rules. This is not secure since any packet can come through without filtering.<\/p><p>Don&rsquo;t worry &ndash; we&rsquo;ll teach you how to define rules in the next step.<\/p><h3 class=\"wp-block-heading\" id=\"h-2-define-chain-rules\">2. Define chain rules<\/h3><p>Defining a rule means appending it to the chain. To do this, you need to insert the <strong>-A<\/strong> option (<strong>Append<\/strong>) right after the iptables command, like so:<\/p><pre class=\"wp-block-preformatted\">sudo iptables -A<\/pre><p>It will alert iptables that you are adding new rules to a chain. Then, you can combine the command with other options, such as:<\/p><ul class=\"wp-block-list\">\n<li><strong>-i<\/strong> (<strong>interface<\/strong>) &mdash; the network interface whose traffic you want to filter, such as eth0, lo, ppp0, etc.<\/li>\n\n\n\n<li><strong>-p<\/strong> (<strong>protocol<\/strong>) &mdash; the network protocol where your filtering process takes place. It can be either <strong>tcp<\/strong>, <strong>udp<\/strong>, <strong>udplite<\/strong>, <strong>icmp<\/strong>, <strong>sctp<\/strong>, <strong>icmpv6<\/strong>, and so on. Alternatively, you can type <strong>all<\/strong> to choose every protocol.<\/li>\n\n\n\n<li><strong>-s<\/strong> (<strong>source<\/strong>) &mdash; the address from which traffic comes from. You can add a hostname or IP address.<\/li>\n\n\n\n<li><strong>&ndash;dport<\/strong> (<strong>destination port<\/strong>) &mdash; the destination port number of a protocol, such as <strong>22<\/strong> (<strong>SSH<\/strong>), <strong>443<\/strong> (<strong>https<\/strong>), etc.<\/li>\n\n\n\n<li><strong>-j<\/strong> (<strong>target<\/strong>) &mdash; the target name (<strong>ACCEPT<\/strong>, <strong>DROP<\/strong>, <strong>RETURN<\/strong>). You need to insert this every time you make a new rule.<\/li>\n<\/ul><p>If you want to use all of them, you must write the commands in this order:<\/p><pre class=\"wp-block-preformatted\">sudo iptables -A &lt;chain&gt; -i &lt;interface&gt; -p &lt;protocol (tcp\/udp) &gt; -s &lt;source&gt; --dport &lt;port no.&gt;&nbsp; -j &lt;target&gt;<\/pre><p>Once you understand the basic syntax, you can start configuring the firewall for more security. For this tutorial, we are going to use the<strong> INPUT<\/strong> chain as an example.<\/p><p><strong>Enabling traffic on localhost<\/strong><\/p><p>To allow traffic on localhost, type this command:<\/p><pre class=\"wp-block-preformatted\">sudo iptables -A INPUT -i lo -j ACCEPT<\/pre><p>We&rsquo;ll use the<strong> lo<\/strong> or <strong>loopback<\/strong> interface for this demonstration. It is utilized for all communications on the localhost. The command above will make sure that the connections between a database and a web application on the same machine are working properly.<\/p><p><strong>Enabling connections on HTTP, SSH, and SSL port<\/strong>s<\/p><p>Next, we want<strong> http<\/strong> (port <strong>80<\/strong>), <strong>https<\/strong> (port <strong>443<\/strong>), and <strong>ssh<\/strong> (port <strong>22<\/strong>) connections to work as usual. To do this, we need to specify the protocol (<strong>-p<\/strong>) and the corresponding port (<strong>&ndash;dport<\/strong>). You can execute these commands one by one:<\/p><pre class=\"wp-block-preformatted\">sudo iptables -A INPUT -p tcp --dport 22 -j ACCEPT\nsudo iptables -A INPUT -p tcp --dport 80 -j ACCEPT\nsudo iptables -A INPUT -p tcp --dport 443 -j ACCEPT<\/pre><p>It&rsquo;s time to check if the rules have been appended in iptables:<\/p><pre class=\"wp-block-preformatted\">sudo iptables -L -v<\/pre><p>It should return with the results below which means all TCP protocol connections from the specified ports will be accepted:<\/p><div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2017\/06\/destination-port-iptables.png\" alt=\"The accepted destination port in iptables which consist of http, https, and ssh\"><\/figure><\/div><p><strong>Filtering packets based on source<\/strong><\/p><p>Iptables allows you to filter packets based on an IP address or a range of IP addresses. To do so, you need to specify it after the<strong> -s<\/strong> option. For example, to accept packets from <strong>192.168.1.3<\/strong>, the command would be:<\/p><pre class=\"wp-block-preformatted\">sudo iptables -A INPUT -s 192.168.1.3 -j ACCEPT<\/pre><p>You can also reject packets from a specific IP address by replacing the<strong> ACCEPT<\/strong> target with <strong>DROP<\/strong>.<\/p><pre class=\"wp-block-preformatted\">sudo iptables -A INPUT -s 192.168.1.3 -j DROP<\/pre><p>If you want to drop packets from a range of IP addresses, you have to use the <strong>-m<\/strong> option and <strong>iprange<\/strong> module. Then, specify the IP address range with <strong>&ndash;src-range<\/strong>. Remember, a hyphen should separate the range of ip addresses&nbsp;without space, like this:<\/p><pre class=\"wp-block-preformatted\">sudo iptables -A INPUT -m iprange --src-range 192.168.1.100-192.168.1.200 -j DROP<\/pre><p>Filtering packets based on their sources is crucial if you are using an intrusion detection and prevention system (IDS\/IPS) like <strong>Suricata<\/strong>. This tool monitors your VPS network and notifies you about malicious traffic.<\/p><p>IDS\/IPS shows the malicious packets&rsquo; origins, which you can add to the iptables blocklist. Check out our article to learn more about <a href=\"\/my\/tutorials\/how-to-install-suricata-on-ubuntu\">how to set up Suricata on Ubuntu<\/a>.&nbsp;<\/p><?xml encoding=\"utf-8\" ?><figure class=\"wp-block-image size-large\"><a href=\"\/my\/vps-hosting\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" width=\"1024\" height=\"300\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/02\/VPS-hosting-banner-1024x300.png\" alt=\"\" class=\"wp-image-77934\" srcset=\"https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2023\/02\/VPS-hosting-banner.png 1024w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2023\/02\/VPS-hosting-banner-300x88.png 300w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2023\/02\/VPS-hosting-banner-150x44.png 150w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2023\/02\/VPS-hosting-banner-768x225.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><p><strong>Dropping all other traffic<\/strong><\/p><p>It is crucial to use the <strong>DROP<\/strong> target for all other traffic after defining <strong>&ndash;dport<\/strong> rules. This will prevent an unauthorized connection from accessing the server via other open ports. To achieve this, simply type:<\/p><pre class=\"wp-block-preformatted\">sudo iptables -A INPUT -j DROP<\/pre><p>Now, the connection outside the specified port will be dropped.<\/p><p><strong>Deleting rules<\/strong><\/p><p>If you want to remove all rules and start with a clean slate, you can use the <strong>-F<\/strong> option (<strong>flush<\/strong>):<\/p><pre class=\"wp-block-preformatted\">sudo iptables -F<\/pre><p>This command erases all current rules. However, to delete a specific rule, you must use the -D option. First, you need to see all the available rules by entering the following command:<\/p><pre class=\"wp-block-preformatted\">sudo iptables -L --line-numbers<\/pre><p>You will get a list of rules with numbers:<\/p><pre class=\"wp-block-preformatted\">Chain INPUT (policy ACCEPT)\n\nnum&nbsp; target &nbsp; &nbsp; prot opt source &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; destination\n\n1&nbsp; &nbsp; ACCEPT &nbsp; &nbsp; all -- 192.168.0.4&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; anywhere\n2&nbsp; &nbsp; ACCEPT &nbsp; &nbsp; tcp -- anywhere &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; anywhere tcp dpt:https\n3&nbsp; &nbsp; ACCEPT &nbsp; &nbsp; tcp -- anywhere &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; anywhere tcp dpt:http\n4&nbsp; &nbsp; ACCEPT &nbsp; &nbsp; tcp -- anywhere &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; anywhere tcp dpt:ssh<\/pre><p>To delete a rule, insert the corresponding chain and the number from the list. Let&rsquo;s say that for this iptables tutorial, we want to eliminate <strong>rule number three<\/strong> of the <strong>INPUT<\/strong> chain. The command should be:<\/p><pre class=\"wp-block-preformatted\">sudo iptables -D INPUT 3<\/pre><p>Alternatively, if you need to filter only the incoming traffic, you can use Hostinger VPS Firewall. Select your VPS and navigate to the <strong>Firewall<\/strong> section:<\/p><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><a href=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/11\/vps-firewall-side-menu.png\"><img decoding=\"async\" width=\"500\" height=\"1080\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/11\/vps-firewall-side-menu.png\" alt=\"\" class=\"wp-image-119010\" style=\"width:264px;height:auto\" srcset=\"https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2019\/11\/vps-firewall-side-menu.png 500w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2019\/11\/vps-firewall-side-menu-139x300.png 139w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2019\/11\/vps-firewall-side-menu-474x1024.png 474w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2019\/11\/vps-firewall-side-menu-69x150.png 69w\" sizes=\"(max-width: 500px) 100vw, 500px\" \/><\/a><\/figure><\/div><p>Create a new configuration, give it a name, and specify any incoming traffic rules you prefer:<\/p><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2016\/09\/hpanel-vps-firewall-configuration.png\"><img decoding=\"async\" width=\"1024\" height=\"465\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2016\/09\/hpanel-vps-firewall-configuration-1024x465.png\" alt=\"The process of creating a new firewall rules on hPanel\" class=\"wp-image-90699\" srcset=\"https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2016\/09\/hpanel-vps-firewall-configuration.png 1024w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2016\/09\/hpanel-vps-firewall-configuration-300x136.png 300w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2016\/09\/hpanel-vps-firewall-configuration-150x68.png 150w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2016\/09\/hpanel-vps-firewall-configuration-768x349.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><\/div><h3 class=\"wp-block-heading\" id=\"h-3-persist-changes\">3. Persist changes<\/h3><p>The iptables rules that we have created are only saved in temporary memory. That means we have to save them to a file to be able to load them again after a reboot. To make these changes you can use these commands depending if you are saving IPv4 or IPv6 rules:<\/p><pre class=\"wp-block-preformatted\">sudo iptables-save &gt; \/etc\/iptables\/rules.v4\nsudo iptables-save &gt; \/etc\/iptables\/rules.v6<\/pre><p>Now whenever you restart your VPS you will need to load the saved rules with the following commands:<\/p><pre class=\"wp-block-preformatted\">sudo iptables-restore &lt; \/etc\/iptables\/rules.v4\nsudo iptables-restore &lt; \/etc\/iptables\/rules.v6<\/pre><p>If you want for the loading process to be completely automatic, you can set up <strong>iptables-persistent<\/strong> package and it will take care of loading the rules.  <\/p><pre class=\"wp-block-preformatted\">sudo apt-get install iptables-persistent<\/pre><p>After installation you will be asked to save the current rules. Choose <strong>Yes<\/strong> for both IPv4 and IPv6 and finish the configuration. Now the loading process will be automatic. Keep in mind that you will still need to use <strong>sudo iptables-save<\/strong> command each time you make changes to iptables. <\/p><h2 class=\"wp-block-heading\" id=\"h-conclusion\">Conclusion<\/h2><p>Iptables is a powerful firewall program that you can use to secure your Linux server or VPS &ndash; you can define various rules based on your preferences.<\/p><p>In this iptables tutorial, you have learned how to install and use the tool. Now, we hope you can manage your sets of rules to filter incoming and outgoing packets.<\/p><p>It&rsquo;s time to test it yourself. Good luck!<\/p><p>\n\n\n<div class=\"protip\">\n                    <h4 class=\"title\">Discover More About How to Protect Your Linux<\/h4>\n                    <p><a href=\"\/my\/tutorials\/how-to-set-up-a-linux-vpn-server-with-openvpn\/\">How to Configure OpenVPN on VPS<\/a><br>\n<a href=\"\/my\/tutorials\/fail2ban-configuration\">How to Configure Fail2Ban on CentOS<\/a><br>\n<a href=\"\/my\/tutorials\/how-to-configure-firewall-on-ubuntu-using-ufw\/\">How to Configure UFW Firewall in Ubuntu<\/a><br>\n<a href=\"\/my\/tutorials\/how-to-install-clamav-centos7\">How to Install ClamAV on CentOS<\/a><\/p>\n                <\/div>\n<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Are you looking for a comprehensive iptables tutorial for your VPS? This article will show you how to install and use iptables on an Ubuntu system. Follow along and learn how to secure your VPS with the command-line interface and a Linux firewall tool. How does iptables work? When a packet matches a rule, it [&#8230;]<\/p>\n<p><a class=\"btn btn-secondary understrap-read-more-link\" href=\"\/my\/tutorials\/iptables-tutorial\">Read More&#8230;<\/a><\/p>\n","protected":false},"author":71,"featured_media":43073,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_title":"Iptables Tutorial: How to Set Up and Use Linux Firewall","rank_math_description":"Iptables is a powerful firewall tool for Linux. Read our Iptables tutorial and learn everything you need to know to secure your server.","rank_math_focus_keyword":"iptables tutorial, linux firewall","footnotes":""},"categories":[22643,22639],"tags":[],"class_list":["post-5614","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-managing-monitoring-and-security","category-vps"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/tutorials\/iptables-tutorial","default":0},{"locale":"pt-BR","link":"https:\/\/www.hostinger.com\/br\/tutoriais\/tutorial-iptables","default":0},{"locale":"fr-FR","link":"https:\/\/www.hostinger.com\/fr\/tutoriels\/iptables","default":0},{"locale":"es-ES","link":"https:\/\/www.hostinger.com\/es\/tutoriales\/como-asegurar-linux-con-iptables-firewall","default":0},{"locale":"id-ID","link":"https:\/\/www.hostinger.com\/id\/tutorial\/iptables-tutorial","default":0},{"locale":"en-UK","link":"https:\/\/www.hostinger.com\/uk\/tutorials\/iptables-tutorial","default":0},{"locale":"en-MY","link":"https:\/\/www.hostinger.com\/my\/tutorials\/iptables-tutorial","default":0},{"locale":"en-PH","link":"https:\/\/www.hostinger.com\/ph\/tutorials\/iptables-tutorial","default":0},{"locale":"es-MX","link":"https:\/\/www.hostinger.com\/mx\/tutoriales\/como-asegurar-linux-con-iptables-firewall","default":0},{"locale":"es-CO","link":"https:\/\/www.hostinger.com\/co\/tutoriales\/como-asegurar-linux-con-iptables-firewall","default":0},{"locale":"es-AR","link":"https:\/\/www.hostinger.com\/ar\/tutoriales\/como-asegurar-linux-con-iptables-firewall","default":0},{"locale":"pt-PT","link":"https:\/\/www.hostinger.com\/pt\/tutoriais\/tutorial-iptables","default":0},{"locale":"en-IN","link":"https:\/\/www.hostinger.com\/in\/tutorials\/iptables-tutorial","default":0},{"locale":"en-CA","link":"https:\/\/www.hostinger.com\/ca\/tutorials\/iptables-tutorial","default":0},{"locale":"en-AU","link":"https:\/\/www.hostinger.com\/au\/tutorials\/iptables-tutorial","default":0},{"locale":"en-NG","link":"https:\/\/www.hostinger.com\/ng\/tutorials\/iptables-tutorial","default":0}],"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/my\/tutorials\/wp-json\/wp\/v2\/posts\/5614","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/my\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/my\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/my\/tutorials\/wp-json\/wp\/v2\/users\/71"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/my\/tutorials\/wp-json\/wp\/v2\/comments?post=5614"}],"version-history":[{"count":62,"href":"https:\/\/www.hostinger.com\/my\/tutorials\/wp-json\/wp\/v2\/posts\/5614\/revisions"}],"predecessor-version":[{"id":119011,"href":"https:\/\/www.hostinger.com\/my\/tutorials\/wp-json\/wp\/v2\/posts\/5614\/revisions\/119011"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/my\/tutorials\/wp-json\/wp\/v2\/media\/43073"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/my\/tutorials\/wp-json\/wp\/v2\/media?parent=5614"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/my\/tutorials\/wp-json\/wp\/v2\/categories?post=5614"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/my\/tutorials\/wp-json\/wp\/v2\/tags?post=5614"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}