0

i am trying to browse web page using custom(user provided) ip address but it's not working. webBrowser1 loads web page successfully but it's not using custom ip address, it loads page with real ip address.

please tell me how to make this work successfully.

this is my code:

private void Form1_Load(object sender, EventArgs e)
    {
        IPAddress addr1 = IPAddress.Parse("192.168.1.100");
        webBrowser1.ScriptErrorsSuppressed = true;
        webBrowser1.Navigate("www.whatismyip.com");
    }
user1608298
  • 321
  • 2
  • 6
  • 8

1 Answers1

2

You can't change your IP like this. Your code obviously doesn't work, because you've just created a variable of type IPAddress and assigned some value to it. If you want a different IP address that you currently have assigned from your internet provider, you need to use a Proxy or TOR if you can't achieve a change of your IP by restarting your modem. However, it won't obviously allow you to use whatever IP you'd like.

walther
  • 13,466
  • 5
  • 41
  • 67
  • OK, tell me what i need to implement in my program to change my ip address. i want to change ip address using my program. – user1608298 Aug 19 '12 at 16:44
  • @user1608298, change, but how? What is the purpose of the program? What exactly are you trying to accomplish? And I don't take "want to change my IP" as an answer... We need to understand your intentions to provide a relevant answer. – walther Aug 19 '12 at 16:50
  • Exactly i don't want to change my ip address i just want to load this page www.whatismyip.com using custom ip address that will show what ip address i am using that's it. – user1608298 Aug 19 '12 at 16:57
  • 3
    @user1608298, right... Short answer - impossible. Slightly longer answer - impossible, because Internet doesn't work this way. IP addresses are assigned by providers and you can't simply just say "hey, this is my answer now on!". Can you imagine the security consequences if anyone could get any ip address he could think of, just by writing some funny little piece of software? – walther Aug 19 '12 at 17:04
  • typo: "my ip address now on", obviously not "my answer..." – walther Aug 19 '12 at 17:10
  • yes you are right due to security any body can not use any ip address but can i use my own another internet connection ip address. i have 2 dial-up internet connections(mobile broadband), can i use second ip address with first connection to load this page "www.whatismyip.com" & it will show my second ip address – user1608298 Aug 19 '12 at 17:45