I am looking to spoof the geo ip information in my local sitecore 8 instance so I can create events widget based on which city the end user is in.
From my research I found you can either use the ForwardedRequestHttpHeader in the header to pass the IP or my own class to override the IP via startTracking pipeline. Both these method allow me to write the IP address into the Interaction collection in my xDB.
My question is how do I resolve the spoofed IP to get rest of the details in Interaction collection document such as city, state, country and postcode?
Please note: I currently do not have access to the sitecore geolocation service. So really need a way to mock all the geo location based data.
Not sure if it helps, but 8.1's Experience Explorer allows you to (natively) spoof locations. If you expand out the ribbon and goto the Experience Tab and click "Other" you'll see "Explore":
Once you click that, the UI will change over and expose two expandable tabs (on left and right). On the left slide-out, you can manage location by going to the "Visitor Information" section and opening the "GEO IP" tab.
What I needed to was to spoof the IP address but also create a custom geo ip lookup provider by overriding the method GetInformationByIp(string ip) in
LookupProviderBase.
Related
We are currently in the design phase of a product we are building for a hospital. We want to install a custom developed software on each computer and one on a central server. It should catch the event of updated patient information of any kind when for example a patient was edited and saved in the HIS. Then on the computer on which the patient was saved we want to display information about the patient in the locally installed software.
We thought about retrieving the HL7-event from a central server and then analyze the data and send back information to our software on the sending computer. But for this we would need the IP address of the computer that caused the HL7-event (e.g. the computer on which the patient was saved in the HIS). Is there any header in which we could find the original IP address? Or when the hospital has a central HL7-server will this give us the IP address of the originally sending computer?
Or can you think of any other way to receive an information about that a patient was saved on the same computer or by the same user? E.g. listening to outgoing traffic seems to be extremely difficult and not very clean. Another option could be to detect the sending user (e.g. AD-user or LDAP-user) but is that information documented within the HL7-event in any way?
TCP level
This is the best option I can imagine; bypassing HL7. I hope you are going to communicate on TCP level. With TCP, on receiving connection, you easily get information about clients IP address. You can use this IP for your purpose.
Custom field in Z segment
Implement ZDS segment and define some field (ZDS(2) may be) with mutual communication and pass the IP address in this field.
Use MSH(2) (Sending Application) and MSH(3) (Sending Facility)
Data in these fields identify the sending application and facility. If this is configured different on each computer in network, you can maintain a table in your database to map IP address against this data.
More than a question this may be general information . I am using a VPN service and located in the Middle East. I've found most (if not all but one) IP geolocation webpages shows my location as New York which matches the VPN IP address. But the service whatismyipaddres_dot_com shows the correct IP address and my location in Kuwait. Clicking some links on the mentioned webpage it takes me to a page showing they use several services from which one is showing Kuwait and the other two New York. However,contary on the expected "majority vote", they pick the single one different which, in fact, is right. As you can see they do not mention the name, but I believe the provider is Maxmind (maxmind_dot_com).
Sorry, not allowed to post images!!
Does anyone knows what they may be using ( router MAC? Google account ?).I use VPN to access ESPN , etc , but if this method is used by all other geoloc services in the future ,it will render the VPN unusable !
The web site whatismyipaddress dot com is using a mixture of HTML5 geolocation and IP geolocation.
Most likely your MAC address are being used to geolocate the location using HTML5 than using IP address geolocation.
Source: http://www.geolocation.com
Basically I'm trying to test a feature of my website, which displays the location(city-level) you're at when visiting my site. And the testing approach I'm planning is: using a host in an arbitrary city to send requests to my site, with the city name appended to the URL, and then compare the known city name with the city name calculated by my site.
This approach requires a service that, given an arbitrary city name and a URL, it asks a host in that city to send requests to that URL.
Does such service/tool/library actually exist? Or is there a better testing approach for that feature?
I frequently do outside-my-network proxies via ProxySwitchy, which is a plugin in Chrome.
Simply install in your browser, get a proxy from the many lists out there, test quickly on a known website to ensure the proxy is working (ESPN or Google is fine--proxies frequently go up and down, so you want to make sure they're working before you test!) then navigate to your test site. You can setup several test proxies in ProxySwitchy and just toggle the list by clicking on the "world" icon in the upper right corner.
A page like this could show you what you should expect to see.
It also works great for testing domain change propagation, path interruptions, and more. Just don't abuse it!
how do one determine location based on ip? I'm not asking for any product or service, but rather how to go about implementing it technically.
The ip to country is a rather static mapping. What about more specific locations?
geobyte is a good service to locate ip address. If you are thinking about an algorithm to find location based on IP, I think there is none. It is basically a database look up and you will retrieve the location based on the IP address.
We design and host websites for our clients/sales force. We have our own domain: http://www.firstheartland.com
Our agents fill out a series of forms on our website that are loaded into a database. The database then renders the website as a database driven website.
/repwebsites/repSite.cfm?link=&rep=rick.higgins
/repwebsites/repSite.cfm?link=&rep=troy.thompson
/repwebsites/repSite.cfm?link=&rep=david.kover
The database application reads which "rep" the site is for and the appropriate page to display from the query string. The page then outputs the content and the appropriate CSS to style the page and give it its own individual branding.
We have told the user to use Domain Name Forwarding to get the users to their spot on our server. However, everyone seems to be getting indexed under our domain instead of their own. We could in theory assign an new IP to them, the cost is not the issue.
The issue is how we would possibly accomplish this.
With all of that said, them being indexed under our domain would still be OK as long as they would actually show up high in the ranking for their search term.
For instance, an agent owns TroyLThompson.com. If I search Troy L Thompson, It does not show up in my search. Only, "troy thompson first heartland" works (they show up third)
Apart from scrapping the whole system, I don't know what to do. I'm very open to ideas.
I'm sure you can get this to work as most hosting companies will host hundreds of websites on a single server (i.e. multiple domains on one IP).
I think you need your clients to update the nameservers for their domains (i.e. DNS) to return the IP address of your hosting server. Then you need to configure your server to return the right website based on the domain that was originally requested.
That requires your "database driven website" to look in the HTTP request and check which domain was originally requested, then it can handle the request accordingly.
- If you are using Apache, see how to configure Apache to host multiple domains on one IP address.
- If you are using Microsoft IIS, maybe Host-Header Routing is what you need.
You will likely need code changes on your "database driven website" to cope with these changes.
I'm not sure that having a dedicated IP address per domain will help much, as then you have to find a way to host all those IP addresses from a single web server. However, if your web server architecture already supports a shared database and multiple servers, then that approach might work well for you, especially if you expect the load from some domains to be so heavy that you need a dedicated web server for them.
Google does not include URL in its index which return a 301 status code. The reason is pretty obvious on second thought, because the redirect tells Google "Whatever was here before has moved there, please update your references". One solution I can see is setting up Apache virtual hosts on your server for each external domain, and have each rep configure their domain's DNS A record to point to the IP address of your server.