{"id":1327,"date":"2020-06-10T21:00:00","date_gmt":"2020-06-10T19:00:00","guid":{"rendered":"https:\/\/blog.mhasin.eu\/?p=1327"},"modified":"2020-06-10T21:00:01","modified_gmt":"2020-06-10T19:00:01","slug":"linux-iptables-nat","status":"publish","type":"post","link":"https:\/\/blog.mhasin.eu\/?p=1327","title":{"rendered":"Linux iptables NAT"},"content":{"rendered":"\n<p>Nastavenie NAT:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>iptables -t nat -A POSTROUTING -d 192.168.204.0\/23 -o eth0 -j MASQUERADE<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>-d 192.168.204.0\/23  - IP rozsah ktory chceme aby sa natoval. Teda ak klient zada poziadavku na tento IP rozsah tak dojde k NAT na ine zariadenie\n\n-o eth0 - interface kktorym ma trafik vystupovat vonku\n\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"488\" src=\"https:\/\/blog.mhasin.eu\/wp-content\/uploads\/2020\/06\/obr\u00e1zok-4-1024x488.png\" alt=\"\" class=\"wp-image-1328\" srcset=\"https:\/\/blog.mhasin.eu\/wp-content\/uploads\/2020\/06\/obr\u00e1zok-4-1024x488.png 1024w, https:\/\/blog.mhasin.eu\/wp-content\/uploads\/2020\/06\/obr\u00e1zok-4-300x143.png 300w, https:\/\/blog.mhasin.eu\/wp-content\/uploads\/2020\/06\/obr\u00e1zok-4-768x366.png 768w, https:\/\/blog.mhasin.eu\/wp-content\/uploads\/2020\/06\/obr\u00e1zok-4.png 1272w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<div class=\"pdf24Plugin-cp\"> \t<form name=\"pdf24Form0\" method=\"post\" action=\"https:\/\/doc2pdf.pdf24.org\/wordpress.php\" target=\"pdf24PopWin\" onsubmit=\"var pdf24Win = window.open('about:blank', 'pdf24PopWin', 'resizable=yes,scrollbars=yes,width=600,height=250,left='+(screen.width\/2-300)+',top='+(screen.height\/3-125)+''); pdf24Win.focus(); if(typeof pdf24OnCreatePDF === 'function'){void(pdf24OnCreatePDF(this,pdf24Win));}\"> \t\t<input type=\"hidden\" name=\"blogCharset\" value=\"Cw1x07UAAA==\" \/><input type=\"hidden\" name=\"blogPosts\" value=\"MwQA\" \/><input type=\"hidden\" name=\"blogUrl\" value=\"yygpKSi20tdPyslP18vNSCzOzNNLLQUA\" \/><input type=\"hidden\" name=\"blogName\" value=\"c\/LxdwcA\" \/><input type=\"hidden\" name=\"blogValueEncoding\" value=\"gzdeflate base64\" \/><input type=\"hidden\" name=\"postId_0\" value=\"MzQ2MgcA\" \/><input type=\"hidden\" name=\"postTitle_0\" value=\"88nMK61QyCwoSUzKSS1W8HMMAQA=\" \/><input type=\"hidden\" name=\"postLink_0\" value=\"yygpKSi20tdPyslP18vNSCzOzNNLLdW3L7A1NDYyBwA=\" \/><input type=\"hidden\" name=\"postAuthor_0\" value=\"y00syfcwNAIA\" \/><input type=\"hidden\" name=\"postDateTime_0\" value=\"MzIwMtA1MNM1NFAwMrQyMLMyMAAA\" \/><input type=\"hidden\" name=\"postContent_0\" value=\"rZJLbtswEIb3PsWAqxYIRb3guIZtwECDIos6aeIcYCzREqMHCZGSLd2mZ+nFOpKBIkCzCOBoMxxq+P0zPzlbmc0OrcNO1krCbrtfroTZzOhbmUZCUqK1a3Yy\/FDqpOCJTiXbrMawUcbhoZQWuIMaHfAtPD48758eXvb3ux\/AUwi+hV4wX3ihH3u+CCPgGqTLfeCv8HP7\/Ovl7mn7\/W4lJhzpNvJjyu+hgcP9IzR6sJhD4XTTQ5InspKAhx4sji3qDksP9jJFwAKKUsnawYCUGj0oil3RUh042tdvcI6qU\/2aSihGi8YSVUs62dCh0bjZ7N9k9MfJ5ogJFU9tVFARscGjKqDrrWsNteGg03XR0qz\/DX9UWfvO\/KrCTIJVg+QlNtnohaoyKDWmqs7WrMShZ5BKwk052r5OGJxU6vI1C\/wwZpBLleVuzeLFgoFtkjXLnTN2KQRpZF6Vo1W1J1tBqomuRxtEa0YJK0I\/9IU\/F\/rQ\/Pk96ILHfISeieWZOmOAJZHZm76njnkQhRcxK90n6sGYnG7gKmDk++cgjiYera\/F3c4X52g+n3C0vhJ3mTK8DU9sunYyFVunb+BLhWc+3etycsGcv1L0O9K7pAwEPajLO9rM\/gI=\" \/> \t\t<a href=\"https:\/\/www.pdf24.org\" target=\"_blank\" title=\"www.pdf24.org\" rel=\"nofollow\"><img src=\"https:\/\/blog.mhasin.eu\/wp-content\/plugins\/pdf24-post-to-pdf\/img\/pdf_32x32.png\" alt=\"\" border=\"0\" height=\"32\" \/><\/a> \t\t<span class=\"pdf24Plugin-cp-space\">&nbsp;&nbsp;<\/span> \t\t<span class=\"pdf24Plugin-cp-text\">Send article as PDF<\/span> \t\t<span class=\"pdf24Plugin-cp-space\">&nbsp;&nbsp;<\/span> \t\t<input class=\"pdf24Plugin-cp-input\" style=\"margin: 0px;\" type=\"text\" name=\"sendEmailTo\" placeholder=\"Enter email address\" \/> \t\t<input class=\"pdf24Plugin-cp-submit\" style=\"margin: 0px;\" type=\"submit\" value=\"Send\" \/> \t<\/form> <\/div>","protected":false},"excerpt":{"rendered":"Nastavenie NAT: &nbsp;&nbsp; Send article as PDF &nbsp;&nbsp;\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"arc_restricted_post":false,"footnotes":""},"categories":[4],"tags":[],"class_list":["post-1327","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/blog.mhasin.eu\/index.php?rest_route=\/wp\/v2\/posts\/1327","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.mhasin.eu\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.mhasin.eu\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.mhasin.eu\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.mhasin.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1327"}],"version-history":[{"count":1,"href":"https:\/\/blog.mhasin.eu\/index.php?rest_route=\/wp\/v2\/posts\/1327\/revisions"}],"predecessor-version":[{"id":1329,"href":"https:\/\/blog.mhasin.eu\/index.php?rest_route=\/wp\/v2\/posts\/1327\/revisions\/1329"}],"wp:attachment":[{"href":"https:\/\/blog.mhasin.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1327"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mhasin.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1327"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mhasin.eu\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1327"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}