I had a problem "i could only access internet only on one private ip due to my idiot admin"....:-(
so , i thought of writing a program (experiment )which could provide me internet on my ip directly.....that would be really cool..kind of nat
so i started with only ping...so that i could at least get ping from ,lets say google..
this following program is just for ping..and may contain small errors..
you can verify that..
so how it will work as per my planning:--
1.let pc A have an ip 192.168.4.25 has internet facility gw 192.168.4.2
2.And me pc B is stupid sitting alone hopeing to get internet with ip 192.168.4.43
so what will really happen , i hope you read the program and work accordingly
....
there will be server running in 192.168.4.25 a kind of simple wireshark..debug are there so you can see all packets incomming and outgoing.
it will check incoming packets tcp,upp,icmp and tear down all ackets headers..when an icmp packet(ping) comes it will check for your ip and save some compareble data of your packet ,
and construct a new packet with your given details but changing its ip to 192.168.4.5..
hence will get a reply from google
all these are static so u can only give on website in program and one ip..
......
when the server gets a reply from it will again construct a new packet and send it to you using previous information.
and thus u get a PING...ha hahahaha
i hope it works for tcp in udp to but data cutting and all those must be done careully coz in case of icmp(ping) data doesnt matters hence it was easy.
*) just set your default gw as 192.168.4.5
so , i thought of writing a program (experiment )which could provide me internet on my ip directly.....that would be really cool..kind of nat
so i started with only ping...so that i could at least get ping from ,lets say google..
this following program is just for ping..and may contain small errors..
you can verify that..
so how it will work as per my planning:--
1.let pc A have an ip 192.168.4.25 has internet facility gw 192.168.4.2
2.And me pc B is stupid sitting alone hopeing to get internet with ip 192.168.4.43
so what will really happen , i hope you read the program and work accordingly
....
there will be server running in 192.168.4.25 a kind of simple wireshark..debug are there so you can see all packets incomming and outgoing.
it will check incoming packets tcp,upp,icmp and tear down all ackets headers..when an icmp packet(ping) comes it will check for your ip and save some compareble data of your packet ,
and construct a new packet with your given details but changing its ip to 192.168.4.5..
hence will get a reply from google
all these are static so u can only give on website in program and one ip..
......
when the server gets a reply from it will again construct a new packet and send it to you using previous information.
and thus u get a PING...ha hahahaha
i hope it works for tcp in udp to but data cutting and all those must be done careully coz in case of icmp(ping) data doesnt matters hence it was easy.
*) just set your default gw as 192.168.4.5
No comments:
Post a Comment