APLawrence - Information and Resources for Unix and Linux Systems, Bloggers and the self-employed
RSS Feeds Get APLawrence.com by RSS











(OLDER) <- More Stuff -> (NEWER) (NEWEST)
Home > Websites, Blogging > It doesn't work that way
Printer Friendly Version




It doesn't work that way




I'm really surprised by how many times I get calls with something similar to the following:

Company A has an internal website for employee access only. They also have a branch office, not connected by a VPN, where employees need to access that same internal website. A firewall rule gives access to the branch office and all is well.. until..

Another internal webserver is set up and this has a link on the first website to allow employees to get to whatever resources are offered there. Of course this works for local employees, but does not work for those at the branch office.

Now most of you are shrugging your shoulders and saying "Yeah, so?" and you are right. But more times than I can remember I have had people who should know better (who probably *do* know better) insist "But it *should* work!"

If by chance you are one of those people, not only should it not work, there are actually multiple reasons why it doesn't, and there are multiple ways that you could make it work. Let's look at why it doesn't work first.

First question: where is the web page you are looking at right now? If you answered "At aplawrence.com on some server somewhere", you get a "Bzzt! Wrong!".. the web page is on your machine. It's been sucked down from my server, yes, but right now it's on your machine, in your RAM and (usually) cached on your hard drive. Exactly how it looks is up to your machine, not mine: my server suggests how I'd like it to look, but it's up to your browser to decide what I meant. The page is yours now, not mine.



So if it is yours, and there is a link in it that points to some internal 192.168.6 address, what is that link actually pointing at? Is there some magic in HTTP that says "Oh, I was talking to *this* IP, so if some link says some other IP, I should go ask that first IP how to get there.. I should go *through* that first IP?"

Of course there isn't. The only time HTTP makes any such assumptions is for indirect links, links that start with a slash instead of "http://". If the link says "http://192.168.6.10", that's where your machine is going to try to go. Not to my machine, but to that specific address. So that's the first reason it isn't going to that other machine: it's starting from your machine, not mine.

The second reason is tcp/ip itself. Internal addresses like "192.168.6" are unrouteable private addresses - you can't get there from anywhere else on the internet. Only your local router will route private addresses, Internet routers will not, so that's another reason why you can't get there from here.

Ok, so how do you solve this? Well, one way is to route either a different public IP or a different port number to that other internal machine. That's called "port forwarding" or "virtual ip" or sometimes other terminology (you'll find it under "Gaming" on some routers). Another way is to use a VPN to connect the branch office and still another is to bring the other server's page to the first server.

But that's much different than the mental view some folks have.


If this page was useful to you, please click to help others find it:  
Your +1's can help friends, contacts, and others on the web find the best stuff when they search.


Comments?




More Articles by Anthony Lawrence - Find me on Google+



Click here to add your comments



Don't miss responses! Subscribe to Comments by RSS or by Email

Click here to add your comments


If you want a picture to show with your comment, go get a Gravatar



Kerio Control Firewall

Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.

Publishing your articles here

Jump to Comments



Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. I also may own stock in companies mentioned here. If you have any question, please do feel free to contact me.

Specific links that take you to pages that allow you to purchase the item I reviewed are very likely to pay me a commission. Many of the books I review were given to me by the publishers specifically for the purpose of writing a review. These gifts and referral fees do not affect my opinions; I often give bad reviews anyway.

We use Google third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.


My Troubleshooting E-Book will show you how to solve tough problems on Linux and Unix systems!


book graphic unix and linux troubleshooting guide




Buy Kerio from a dealer who knows tech: I sell and support

Kerio Connect Mail server, Control, Workspace and Operator licenses and subscription renewals
pavatar.jpg

This post tagged:

       - Networking
       - Web/HTML




Unix/Linux Consultants

Skills Tests

Guest Post Here