{"id":47,"date":"2010-02-01T14:50:13","date_gmt":"2010-02-01T13:50:13","guid":{"rendered":"http:\/\/toderu.ro\/blog\/?p=47"},"modified":"2010-02-01T14:50:13","modified_gmt":"2010-02-01T13:50:13","slug":"how-to-set-up-nat-routing-on-windows-xp-not-the-best-sollution","status":"publish","type":"post","link":"https:\/\/kb.toderu.ro\/?p=47","title":{"rendered":"How to set up NAT Routing on Windows XP -> not the best sollution"},"content":{"rendered":"<p>\t\t\t\tHello again! I decided to stop making programming tutorials for a couple of days so in this tutorial you will learn how<br \/>\nto set up NAT Routing on Windows XP. Some of you know that some time ago I was working on a project in Visual Basic 6<br \/>\nthat would do this thing. So, in Windows there is a tool that is used to manage network stuff like setting IP Addresses,<br \/>\nset up routing etc. This tool\u2019s name is netsh (short for network shell). Using netsh you will need 2 NICs (Network<br \/>\nInterface Cards), one to connect to the public network(to the Internet) and the other to connect to the private<br \/>\nnetwork(to other computers in LAN). So the network schema will look like this:<\/p>\n<p>As we see, the machine that has 2 NICs will have routing enabled and will be the other client\u2019s gateway. The clients<br \/>\nwill connect to their gateway through a switch(if there will be only one client you can use a cross-over cable from<br \/>\ngateway\u2019s private NIC to clients NIC).<\/p>\n<p>Now HOW TO INSTALL IT?<br \/>\nFirst we open the Control Panel. If you are using the \u201cCategory View\u201d to view icons first go to \u201cPerformance and<br \/>\nMaintenance\u201d and then \u201cAdministrative Tools\u201d otherwise go straight to the \u201cAdministrative Tools\u201d then open<br \/>\n\u201cServices\u201d. On the list find \u201cRouting and Remote Access\u201d, double click on it and set the Startup type to<br \/>\n\u201cAutomatic\u201d and click OK. Close the Services window and open the registry editor by going to Start > Run\u2026 and<br \/>\ntyping \u201cregedit\u201d without the \u201c \u201d. Click OK and in the window expand to the following path: My Computer ><br \/>\nHKEY_LOCAL_MACHINE > SYSTEM > CurrentControlSet > Services > Tcpip > Parameters. Now in the list you will see something<br \/>\nlike \u201cIPEnableRouter\u201d. Double click on it and turn the value from 0 to 1. Now restart your computer.<\/p>\n<p>You must know the names of your adapters you are using. For the tutorial we will use \u201cWireless Network Connection\u201d<br \/>\nfor the public NIC and \u201cLocal Area Connection\u201d for the private NIC.<\/p>\n<p>Now we open the command prompt and type the following command to install NAT:<\/p>\n<p>Code:<\/p>\n<p><code>netsh routing ip nat install<\/code><\/p>\n<p>Now type the next command to add the public interface:<\/p>\n<p>Code:<\/p>\n<p><code>netsh routing ip nat add interface \"Wireless Network Connection\" full<\/code><\/p>\n<p>And the last command to add the private interface:<\/p>\n<p>Code:<\/p>\n<p><code>netsh routing ip nat add interface \"Local Area Connection\" private<\/code><\/p>\n<p>&#8230;and the installation is done!<\/p>\n<p>What about the client\u2019s IP addresses?<br \/>\nOh yeah! Set an IP to the private NIC of the machine that is doing routing and the clients will use that IP as their<br \/>\ndefault gateway. The client\u2019s IP addresses must be the same subnet as the gateways. Your public NIC\u2019s IP doesn\u2019t<br \/>\nneed to be changed!<\/p>\n<p>Heres an example of an IP configuration:<\/p>\n<p>As you see the public NIC\u2019s IP address on the routing machine is not the same subnet as the private NIC\u2019s IP<br \/>\naddress. So be careful, the mustn\u2019t be!<\/p>\n<p>I hope you will find this thread useful and save some money buying routers. If you want to set up a wireless router then<br \/>\ncheck the tutorials session later because I\u2019ll be talking about creating ad-hoc wireless networks on Windows XP.<\/p>\n<p>PS: I&#8217;m sorry if you don&#8217;t like my computers on the schemes, I&#8217;ve drawn them in Paint, lol<\/p>\n<p>Best wishes,<br \/>\nDren<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hello again! I decided to stop making programming tutorials for a couple of days so in this tutorial you will learn how to set up NAT Routing on Windows XP. Some of you know that some time ago I was working on a project in Visual Basic 6 that would do this thing. So, in [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,17],"tags":[],"class_list":["post-47","post","type-post","status-publish","format-standard","hentry","category-networking","category-windows"],"_links":{"self":[{"href":"https:\/\/kb.toderu.ro\/index.php?rest_route=\/wp\/v2\/posts\/47","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kb.toderu.ro\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kb.toderu.ro\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kb.toderu.ro\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kb.toderu.ro\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=47"}],"version-history":[{"count":0,"href":"https:\/\/kb.toderu.ro\/index.php?rest_route=\/wp\/v2\/posts\/47\/revisions"}],"wp:attachment":[{"href":"https:\/\/kb.toderu.ro\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=47"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kb.toderu.ro\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=47"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kb.toderu.ro\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=47"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}