hide ip address - c#

I'm using HTTPWebrequest to get data from a website. Is there any way I can hide my IP or generate new ones? It doesn't have to be done trough code, a software would also be ok.
PS: I'm not doing anything illegal, it is a project I have for university

Your only answer would be using a proxy, you can find web proxies, or you can download ones that will work on your computer. This will change the IP address that the server will see.

Related

How to get client's computer MAC Address and IP in asp.net?

I want to get client computer MAC address and IP at the time of login for purpose of uniquely identify the client computer.
To get the user's IP address you can use Request.UserHostAddress or Request.ServerVariables["REMOTE_ADDR"].
Getting the MAC address I am not sure it is so simple. It is not something that is available to the server (ASP.NET) like the IP address is. From what I know you will need to use client scripting and ActiveX or Java applets to get to that information (after multiple installation and security prompts on the users' machines).
So in other words, get IP address by Request.UserHostAddress. Avoid using MAC address and look for another solution if IP is not unique enough for your needs. Maybe combine it with browser User Agent string instead (Request.ServerVariables["HTTP_USER_AGENT"] or Request.UserAgent but the latter might not be available in older versions of .NET).
You can get client IP address from request objects UserHostAddress property like
Page.Request.UserHostAddress
Looks like there is no straight forward way of getting client MAC address except using WMI which other answers already have pointed on.
refer to the below link , may be they will be useful for you...
http://forums.asp.net/t/1911211.aspx?Get+Client+Mac+Address+in+Asp+Net+Web+Application
http://www.codeproject.com/Answers/187064/i-need-MAC-Address-of-client-machine-using-asp-net#answer1

Current.Request.Url give my computer IP address not domain name

I don't know about networking, but I ask my sysadmin to host my application into subdomain at our official site, for example the official site of my office is downtoearth.com. And then he just ask IP address of my computer where I developed my application, then he said that my application already accessible from myapp.downtoearth.com
I can open my application from that domain, but my problem now is when I try to get my current URL, it give me IP address of my computer. I tried using HttpContext.Current.Request.Url.GetLeftPart(UriPartial.Authority) and HttpContext.Current.Request.Url.Host but it give me the same result, what I want is my domain myapp.downtoearth.com/ not my IP address. Is there some ways to solve it?
My internet office use Proxy, so my computer didn't have an IP public. Of course if it give IP address of my computer, it will get error 404 not found. I use Razor MVC4 and IIS 8.
Sorry if there is some misspelling, English is not my default language and this is my first question at stackoverflow. I hope you understand my problem.
Probably your application is behind some load balancer. You shouldn't use the Request.Url as this is not working as it is expected in all circumstances. In your case the request is treated as local and this is why Url is your IP. Instead you can use Request.UserHostName. Please find this link

How to build Opera unite like functionality using .NET?

How to build Opera unite like functionality using .NET?
When we run opera browser and enable the opera unite then it shares our desktop on web and we can access it over internet without having a static IP, how does this works?
You need to map your dynamic IP to some static DNS name. One easy to use solution would be a DynDNS service. For these you get a small client program (or good routers already have a dyn dns client already implemented), that simply maps your current ip address to a specfic dns name.
After getting this done it depends on how variable you like it:
- Do you have one master that should be able to look on various client PCs for help?
- Do you like to connect two clients which are both have dynamic ips?
In the first case your master is the one how always ensure to map his current ip address to the dns name. On the router maybe some port forwarding is needed and your clients get a vnc client with reverse mode enabled. This allows everyone to built up a connection to your master and sharing the desktop without any changes on the client site. Only on the master site has something to be done (dynDns and port forwarding).
In the second case it is a little bit more complicated. Now you got two dynamic IPs that like to connect to each other. This is normally be done through some kind of mediator. Means both machine connect to some master (reachable through some DNS name). Now both machines have a bi-directional connection to the master and the master will simply take the data from the first client and forwards it to the second and vice versa. To take all the burden from the master it would be possible that the master in a first step sends the ip address of client A to B and vice versa. Then in a first step both trying to connect to each other directly. This method is known as UDP hole punching and does not always work, which then leads to a fallback to use the master instead.
Two examples that are using the second approach are Skype and join.me.
All these techniques don't have to do anything with .Net. It is pure knowledge about ethernet, TCP/IP, internet, etc. And due to the fact that you have to do a lot of work in this low-level area i would think that C# is not the ideal framework to accomplish this task. Maybe to put the GUI as last step over it all, but for the real work behind the scenes you need some decent network know-how which is mostly independent from the programming language you are using.
You should run your own DNS server. And whenever an user opens the browser and logs in, you should send the current IP address of the user to your server and update in your local DNS. Since you will have only a subdomain (desktop.operaunitecom), whenever someone hit your url it first goes to operaunite DNS server from where it will fetch your IP address. When the user's session closes you should remove the DNS entry. This could be a possible solution.

Resolving DNS in ASP.NET (MVC) to Host Name/Proxy

Alright, this question sounds a bit stupid, I know. I've looked at some of the other questions about it and I'm getting inconsistent results, even though I am finding the right answers. I'll try to lay it out as plainly as I can.
I have a problem where a large number of visitors to my site are using a ...I use the term popular very loosely, internet service (AOL) to access it. This is beyond my control. It is a large part of the userbase and I cannot stop them from using its built in browser (which derives from IE).
Now, this isn't the inherit problem. The problem is that any sites accessed through the browser go through one of their proxies. This does not cause any conflicts, but we need to know who is unique and who isn't for some specific reasons.
I have an installation of a popular message board system called "Invision Power Board". It tracks people's IP Address's and it has a feature to resolve an IP. So, I can click on an IP, and it will 'resolve' to a host like ..
IP XX.XXX.XX.XXX resolves to cache-dtc-ae16.proxy.aol.com.
Now I understand kind of what is going on here. cache-dtc-ae16.proxy.aol.com is a proxy, so I can't do much about that. I've come to terms with that. The code that does this is in IPB, and I don't speak PHP, so I'm SOL in that department.
I know how to get a User's IP Address.
HttpContext.Request.UserHostAddress
What I want to know is this ... from an IP, how can I 'resolve' to that proxy, in C#? I basically want to setup a specific part of code that denies anything from a proxy that has .aol. in it.
Does what I am trying to make any sense, is it even feasible or possible? I may be completely missing the terminology. I believe I understand this much.
UserHostAddress is the **client's** IP Address
Here is what I have tried, basically.
System.Net.Dns.GetHostEntry(System.Net.IPAddress.Parse(HttpContext.Request.UserHostAddress)).Aliases
are you trying to get the domain name from the ip?
it looks like your answer is in this question here
IPHostEntry IpToDomainName = Dns.GetHostEntry("209.85.129.103");
string HostName = IpToDomainName.HostName; //it returns "fk-in-f103.1e100.net"
This is a limitation of TCP protocol. The address is part of the TCP packet and as far as I know, routers and switches and NATs and proxies change the address and put their own.
As far as I know, there is no way around it. Proxy's address is as good as you gonna get.
I believe even TCP packet's MAC (physical) address is going to be proxy's but that is something to look at although not sure if you can get that in ASP.NET runtime since a request can come in multiple TCP packets.
try this
NullifyNetwork - A comprehensive Microsoft DNS Server management implementation in C#

Is it possible to write C# code as below and send email using network in different country?

Is it possible to write C# code as below and send email using mnetwork in different country?
MSExchangeWebServiceURL = mail.something.com/ews/exchange.asmx
It's a web service URL. This works great when I run the same code from home network, my friends home network anywhere around, but when I run it from my client's location in Columbia it fails.
I have a valid user name and password on that Exchange Server. Is there any configuration that I can set to achieve this?
BTW this code below works when I run it within office network and any network within any home network. I have tried it at least with five friends network in Plano, Texas. I want this code to work running from any network in another country.
My client in Columbia can connect to the web service using a browser using the same user name and password, but when I run the code above it is not able to connect to our web service.
EDIT: Based on the comments and updated post, I would wager that the client location has a proxy server or firewall that is blocking the traffic. The client probably needs to add the relevant domain to whatever "whitelist" they have.
If it works from an internal network, then the problem is most likely not the code. You need to debug it and see what error turns up when running it outside of the network. Then check the logs on the firewall and the target exchange server to see what is happening.
One possible culprit is that the DNS name is not setup outside the office network, or that the office firewall is not setup to pass traffic (or only to pass SMTP traffic) from the internet to the server in question. Another is that Exchange Web Services is not setup properly to accept requests from the outside world. That can be tested from http://www.testexchangeconnectivity.com/.
If this isn't enough for you to get there, post more info about what errors you are seeing. "It isn't working, I want it to work" kind of reminds me of the Star Trek TNG episode about the species who kept telling Geordi to "make it go".
If you are asking if the code works (which it doesn't look like you are but it's in your post) you should ask on stackoverflow. If you are wondering why it won't work from home Its likely because the edge server is not set up to relay, and if you are at home and not vpn'd into the network that's all you have access to.
You need to break this down a bit:
What's the MSExchangeWebServiceURL? I don't need to know your real URL, but is this resolvable from your home network? i.e. is it an internal DNS host (server.mycompany.local) or is it an externally-resolvable DNS host (mail.yourcompany.com)?
If it's internal, like another poster said, you'll at least need to VPN in (or replace that with the external URL).
I'm not a big C# guy, but I'm guessing it's looking for your Exchange Server hostname or FQDN, and since the type is "SMTP" it wants to establish a TCP session with your mail server. You can likely test this out by opening up your command prompt and trying to telnet <MSExchangeWebServiceURL> 25. When that works, my guess is your code will work too.

Categories

Resources