Hey! it was a real fun today. I had to learn nat and I live at my place not in the hostel where you can have ready access to the network and you know the various ip addresses present at your disposal and obviously a lot of colleagues. So does this mean I could not learn nat today? It just struck--why not connect the two laptops I am having with the lan wire, and try something? I did.
I was like knowing that this is gonna happen and it should; but how? The lappies were not connecting! Then I thought of changing the IP addresses and the gateway address- manual connection. And yes! I was on. I started a terminal. I din't know any other place to test. I thought what can I possibly do now- telnet, ssh?? I tried both but 'connection refused'! (Well, as must be clear by now; I am a beginner to all this networking and have till now always remained confused on how this giant Internet machine works?)
Then I resorted to the beginning- ping! I typed 'ping address'-the address I had given to these machines, 10.10.0.2(firewall) and 10.10.0.3(server) and yes that happened. Well nothing big.Then I did 'wget address', an attempt to establish an http session. On one address connection refused and on other a file 'index.html' was transferred. I was puzzled!
I searched for the file. On opening the file I realized that the file was the one I wrote a few days back. This was good, I could now relate. Since I had an apache server up and running on this machine, therefore this machine could respond to the 'http request' and send index file during wget...
WOW! The questions in my mind were being answered though new questions were arising. But I had, in my otherwise undirected attempt, actually established a very crude and basic network of two lappies and a lan cable.... Well now I'll hurry to cook more using iptables, I had to learn nat! catch ya with further results soon!