{"id":1063,"date":"2018-03-16T12:10:06","date_gmt":"2018-03-16T15:10:06","guid":{"rendered":"http:\/\/blog.abratel.com.br\/?p=1063"},"modified":"2018-03-16T12:18:10","modified_gmt":"2018-03-16T15:18:10","slug":"regras-firewall-para-openvpn","status":"publish","type":"post","link":"https:\/\/blog.abratel.com.br\/?p=1063","title":{"rendered":"Regras firewall para openvpn"},"content":{"rendered":"<p>Regras para passar trafego pelo iptables:<\/p>\n<p>Exemplo:<\/p>\n<p>tun0 &#8211; interface openvpn<br \/>\neth0 &#8211; lan<\/p>\n<p># vpn<br \/>\niptables -A INPUT -i tun0 -j ACCEPT<\/p>\n<p># openvpn<br \/>\niptables -t nat -A POSTROUTING -s 10.8.0.0\/24 -o eth0 -j MASQUERADE<\/p>\n<p>iptables -A FORWARD -i tun0 -j ACCEPT<br \/>\niptables -A FORWARD -i tun0 -o eth0 -m state &#8211;state RELATED,ESTABLISHED -j ACCEPT<br \/>\niptables -A FORWARD -i eth0 -o tun0 -m state &#8211;state RELATED,ESTABLISHED -j ACCEPT<\/p>\n<p># aceitar a openvpn<br \/>\niptables -A INPUT -p udp &#8211;dport 1195 -j ACCEPT<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Regras para passar trafego pelo iptables: Exemplo: tun0 &#8211; interface openvpn eth0 &#8211; lan # vpn iptables -A INPUT -i tun0 -j ACCEPT # openvpn iptables -t nat -A POSTROUTING -s 10.8.0.0\/24 -o eth0 -j MASQUERADE iptables -A FORWARD -i tun0 -j ACCEPT iptables -A&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[2],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.abratel.com.br\/index.php?rest_route=\/wp\/v2\/posts\/1063"}],"collection":[{"href":"https:\/\/blog.abratel.com.br\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.abratel.com.br\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.abratel.com.br\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.abratel.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1063"}],"version-history":[{"count":1,"href":"https:\/\/blog.abratel.com.br\/index.php?rest_route=\/wp\/v2\/posts\/1063\/revisions"}],"predecessor-version":[{"id":1064,"href":"https:\/\/blog.abratel.com.br\/index.php?rest_route=\/wp\/v2\/posts\/1063\/revisions\/1064"}],"wp:attachment":[{"href":"https:\/\/blog.abratel.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1063"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.abratel.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1063"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.abratel.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1063"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}