{"id":400,"date":"2015-08-07T00:51:43","date_gmt":"2015-08-06T22:51:43","guid":{"rendered":"http:\/\/xn--jrme-bpa1e.net\/blog\/?p=400"},"modified":"2015-08-07T00:51:43","modified_gmt":"2015-08-06T22:51:43","slug":"debian-router","status":"publish","type":"post","link":"https:\/\/xn--jrme-bpa1e.net\/blog\/post\/400\/debian-router\/","title":{"rendered":"Debian router"},"content":{"rendered":"<p>\/etc\/network\/interfaces<br \/>\n<code><br \/>\nauto eth0:0<br \/>\niface eth0:0 inet static<br \/>\n  address 192.168.170.86<br \/>\n  netmask 255.255.255.0<br \/>\n  broadcast 192.168.170.255<br \/>\n<\/code><\/p>\n<p><code>#!\/bin\/sh<\/p>\n<p>PATH=\/usr\/sbin:\/sbin:\/bin:\/usr\/bin<\/p>\n<p>#<br \/>\n# delete all existing rules.<br \/>\n#<br \/>\niptables -F<br \/>\niptables -t nat -F<br \/>\niptables -t mangle -F<br \/>\niptables -X<\/p>\n<p># Always accept loopback traffic<br \/>\niptables -A INPUT -i lo -j ACCEPT<\/p>\n<p># Allow established connections, and those not coming from the outside<br \/>\niptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT<br \/>\niptables -A INPUT -m state --state NEW -i ! eth1 -j ACCEPT<br \/>\niptables -A FORWARD -i eth1 -o eth0 -m state --state ESTABLISHED,RELATED -j ACCEPT<\/p>\n<p># Allow outgoing connections from the LAN side.<br \/>\niptables -A FORWARD -i eth0 -o eth1 -j ACCEPT<\/p>\n<p># Masquerade.<br \/>\niptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE<\/p>\n<p># Don't forward from the outside to the inside.<br \/>\niptables -A FORWARD -i eth1 -o eth1 -j REJECT<\/p>\n<p># Enable routing.<br \/>\necho 1 > \/proc\/sys\/net\/ipv4\/ip_forward<br \/>\n<\/code><\/p>\n<p>https:\/\/www.debian-administration.org\/article\/23\/Setting_up_a_simple_Debian_gateway<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\/etc\/network\/interfaces auto eth0:0 iface eth0:0 inet static address 192.168.170.86 netmask 255.255.255.0 broadcast 192.168.170.255 #!\/bin\/sh PATH=\/usr\/sbin:\/sbin:\/bin:\/usr\/bin # # delete all existing rules. # iptables -F iptables -t nat -F iptables -t mangle -F iptables -X # Always accept loopback traffic iptables &hellip; <a href=\"https:\/\/xn--jrme-bpa1e.net\/blog\/post\/400\/debian-router\/\">Continuer la lecture <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-400","post","type-post","status-publish","format-standard","hentry","category-non-classe"],"_links":{"self":[{"href":"https:\/\/xn--jrme-bpa1e.net\/blog\/wp-json\/wp\/v2\/posts\/400","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/xn--jrme-bpa1e.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xn--jrme-bpa1e.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xn--jrme-bpa1e.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xn--jrme-bpa1e.net\/blog\/wp-json\/wp\/v2\/comments?post=400"}],"version-history":[{"count":1,"href":"https:\/\/xn--jrme-bpa1e.net\/blog\/wp-json\/wp\/v2\/posts\/400\/revisions"}],"predecessor-version":[{"id":401,"href":"https:\/\/xn--jrme-bpa1e.net\/blog\/wp-json\/wp\/v2\/posts\/400\/revisions\/401"}],"wp:attachment":[{"href":"https:\/\/xn--jrme-bpa1e.net\/blog\/wp-json\/wp\/v2\/media?parent=400"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xn--jrme-bpa1e.net\/blog\/wp-json\/wp\/v2\/categories?post=400"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xn--jrme-bpa1e.net\/blog\/wp-json\/wp\/v2\/tags?post=400"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}