{"id":278,"date":"2009-05-26T18:01:41","date_gmt":"2009-05-26T21:01:41","guid":{"rendered":"http:\/\/wordpress.matbra.com\/?p=278"},"modified":"2010-07-25T21:03:04","modified_gmt":"2010-07-26T00:03:04","slug":"compartilhar-internet-com-servidor-na-porta-wan","status":"publish","type":"post","link":"https:\/\/wordpress.matbra.com\/en\/2009\/05\/26\/compartilhar-internet-com-servidor-na-porta-wan\/","title":{"rendered":"Share internet in a SERVER connected to WAN port."},"content":{"rendered":"<p>Hello,<\/p>\n<p>The last days I keep trying to configure my server. I know how to configure the network to this: <\/p>\n<blockquote><p>MODEM -> (eth0) Servidor (eth1) -> (LAN Port) Router (LAN Ports) -> Computers<\/p><\/blockquote>\n<p>This topology don`t work for me, because in this way I lost one WAN Port. So I thought in this topology:<\/p>\n<blockquote><p>MODEM -> (eth0) Servidor (eth1) -> (Porta WAN) Router (Portas LAN) -> Computadores<\/blockqu\n\nFirst of all configure your eth1 manyally as (edit \/etc\/network\/interfaces):\n\n\n<blockquote>auto eth1<br \/>\niface eth1 inet static<br \/>\naddress 192.168.100.254<br \/>\nnetmask 255.255.255.0<br \/>\nnetwork 192.168.100.0<br \/>\nbroadcast 192.168.100.255<\/p><\/blockquote>\n<p>After this I add this iptables rules:<\/p>\n<blockquote><p>sysctl net.ipv4.ip_forward=1<br \/>\niptables -t nat -A POSTROUTING &#8211;out-interface eth0 -j MASQUERADE<br \/>\niptables -A FORWARD &#8211;in-interface eth0 -j ACCEPT<\/p><\/blockquote>\n<p>I need to setup the router manually:<\/p>\n<blockquote><p>IP Address : 192.168.100.1<br \/>\nSubnet Mask : 255.255.255.0<br \/>\nISP Gateway Address : 192.168.100.254<br \/>\nPrimary DNS Address : 200.247.141.11 (DNS)<br \/>\nSecondary DNS Address : 200.247.141.12 (DNS)<\/p><\/blockquote>\n<p>So up and running<\/p>\n<p>Matheus<\/p>","protected":false},"excerpt":{"rendered":"<p>Hello, The last days I keep trying to configure my server. I know how to configure the network to this: MODEM -> (eth0) Servidor (eth1)&#8230;<\/p>\n<div class=\"more-link-wrapper\"><a class=\"more-link\" href=\"https:\/\/wordpress.matbra.com\/en\/2009\/05\/26\/compartilhar-internet-com-servidor-na-porta-wan\/\">Continue reading<span class=\"screen-reader-text\">Share internet in a SERVER connected to WAN port.<\/span><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[7,34],"tags":[114,113,111,319,115,112,94,110],"class_list":["post-278","post","type-post","status-publish","format-standard","hentry","category-aprendendo","category-linux","tag-compartilhar","tag-internet","tag-lan","tag-linux","tag-modem","tag-roteador","tag-servidor","tag-wan","entry"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/psjGE-4u","_links":{"self":[{"href":"https:\/\/wordpress.matbra.com\/en\/wp-json\/wp\/v2\/posts\/278","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.matbra.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wordpress.matbra.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.matbra.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.matbra.com\/en\/wp-json\/wp\/v2\/comments?post=278"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.matbra.com\/en\/wp-json\/wp\/v2\/posts\/278\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.matbra.com\/en\/wp-json\/wp\/v2\/media?parent=278"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wordpress.matbra.com\/en\/wp-json\/wp\/v2\/categories?post=278"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wordpress.matbra.com\/en\/wp-json\/wp\/v2\/tags?post=278"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}