Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Accessing a local DSL machine by its external IP Internet
When you have a (A)DSL connection like I do, you have to specify your internal IP number in the Network control panel, as well as the router address. For example, 10.0.0.150 and 10.0.0.138. Your real IP address will be different. When you have built a website on your computer (or anything else), you may want to check if what you did was any good. This can be a problem, since your 'outside' IP address is, of course, not 10.0.0.150, but some other number. This can be a fustrating mess. After checking complicated solutions like the Apache conf file and routed, I just found an amazing simple solution!
  • Go to Preferences -> Network and selelect Network Port Configurations from the popup.
  • Duplicate your ethernet card's port
  • Change the IP address to your outside IP number, e.g. 80.60.xx.xx (no complete sample ;-))
  • Set the netmask: 255.255.0.0
  • Set the router: 127.0.0.1
  • Hit Apply Now
The control panel will complain that the router's address is not in your address range. Ignore this. Now you can access your local machine by its external IP. I'm quite amazed at the simlicity of this!

[robg adds: I have not tested this one...]
    •    
  • Currently 2.00 / 5
  You rated: 5 / 5 (4 votes cast)
 
[9,856 views]  

Accessing a local DSL machine by its external IP | 15 comments | Create New Account
Click here to return to the 'Accessing a local DSL machine by its external IP' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Accessing a local DSL machine by its external IP
Authored by: deleted_user18 on Apr 09, '03 10:28:46AM

Another solution: Activate Rendezvous and access your apache by its Rendezvous-name.

There is even an Rendezvous menu in Safari and camino for this purpose.



[ Reply to This | # ]
Accessing a local DSL machine by its external IP
Authored by: JoeGrind on Apr 09, '03 11:11:48AM
Is the objective to use your external IP or is it simply to access your site on the local machine? If it's the latter and not the former, then http://localhost should suffice, no? Or even using http://127.0.0.1, the same IP you put in for your gateway.

Sounds like you went to a little trouble to work this out so I presume the localhost option isn't a solution for you but maybe it will help someone else.

[ Reply to This | # ]
Accessing a local DSL machine by its external IP
Authored by: sfn on Apr 09, '03 11:34:37AM

If you are running 10.2.2 or better you do not need to do this. Go to
Sharing prefpane and note your Rendezvous name. Just type that into
your web browser's location bar and away you go.

In Safari and 10.2.4 it is even easier since it will be listed under the
Rendezvous bookmarks.

Or just use 'localhost' or 127.0.0.1 like the other replies said.

---
-sfn



[ Reply to This | # ]
Accessing a local DSL machine by its external IP
Authored by: bluestar on Apr 09, '03 12:00:00PM

As others have said there's no reason you need to use your external address internally. You may need to add:

Listen *:80

to /etc/httpd/httpd.conf

Also go to www.dyndns.org. They provide stable domain names for people with dynamic IP addresses.



[ Reply to This | # ]
Accessing a local DSL machine by its external IP
Authored by: awk on Apr 09, '03 03:49:38PM

I'm not 100% sure, but won't this mess up things if you want your mac to communicate with other machines on the 80.60.x.x network? I.e., they will all be sent to 127.0.0.1 instead of your DSL route .. maybe a network guru can comment?

My instinct would be to use a netmask of 255.255.255.255 which would put just that one IP there.

Actually I'd probably just use localhost as others have suggested but it's also good to try things different ways!



[ Reply to This | # ]
Accessing a local DSL machine by its external IP
Authored by: vlipper on Apr 09, '03 08:03:24PM

You're absolutely right. It was not handy from me to use 80.60.x.x.as an exaple. A better example would be 1.2.3.4 ;-)
I think the control panel would not accept 80.60.x.x either.

---
Communication is coming on strong - j. hendrix



[ Reply to This | # ]
Accessing a local DSL machine by its external IP
Authored by: joakod on Apr 09, '03 07:45:07PM

Hello!

When i saw this hit i thought it could help me.

I'm a Timbucktu user, and my Mac is behind a Linux router (which connects to dsl). Because my mac ip address is not a "public" address I'm not able to access it using tb2 from outside.
There's also a similar problem when you want to recieve a file using instant messaging apps.

This apparently could solve my problem, but unfortunately the ip adress was detected as duplicated with the linux box. :-(

---
- Joaquin!



[ Reply to This | # ]
Accessing a local DSL machine by its external IP
Authored by: vlipper on Apr 09, '03 08:12:46PM

When I compare your case to mine, the main difference is that my OS X box is your Linux box. My modem does the NAT stuff for me (i.e. translate between outside address and inside address(es)).

If your modem can do NAT, and your that is also the only reason you use the Linux box, ditch the box. But you are probably doing firewalling as well.

I can only suggest to you to look into setting up the routing table on your mac properly. I don't know much about it, but it should be something like:

default linuxbox
osxbox 127.0.0.1
10.0.0.12 127.0.0.1
localhost 127.0.0.1

where the first column refers to the from host (your Mac), and the second to your loopback. (exept for the first, which is your router/NAT/Linux box)

success

ps. ditch Linux and use Darwin, it will save you the trouble of learning 2 routing methods (dialects)

---
Communication is coming on strong - j. hendrix



[ Reply to This | # ]
Accessing a local DSL machine by its external IP
Authored by: Fofer on Apr 09, '03 09:09:37PM

It's called NAT, and port mapping:
http://www.netopia.com/en-us/support/howtodocs/mac/airport.html

(In this case Airport is acting as the router, the same instructions apply.)

More info on using Netopia's IP Locator with a router:
http://www.netopia.com/en-us/support/howtodocs/mac/
dynamicrouter.html



[ Reply to This | # ]
Accessing a local DSL machine by its external IP
Authored by: mustang_dvs on Apr 10, '03 11:31:53AM

The easiest solution is to set up port forwarding for ports 407 and 1417-1420, so that the external server refers to the specific machine, by IP address.

You can do the same for AIM, but I am not sure of those port assignments.



[ Reply to This | # ]
Am I missing the point here?
Authored by: digitalone on Apr 10, '03 08:33:51PM

Some one needs to fill me in on the exact scheme that your DSL provider uses to get you on the network and not have the damn thing act like one big LAN. (Think multicast packets slamming hundreds of users at a time.) That is the purpose of using internal and external IP addresses like this. What you are attempting to do, from my understanding, is to remove that second fail-safe IP and expose yourself directly to the internet, skipping your DSL providers network (?).

I know from experience that a cable modem has 2 internal addresses, and your machine keeps the WAN IP address. For example, the upstream and downstream CTMS (Cable modem termination system) servers would have an IP address of 10.0.0.1, your modem's first internal address would be 10.0.0.2, its second internal address would be 10.0.1.1 and your WAN IP address would be 64.23.12.1 (dummy IP). Thus method uses your cable modem as a bridge, connecting it to the CTMS transparently, and allowing your to request routable IP addresses, like a 207.xxx.xxx.xxx address for example. This way
A) Internet cannot access certain internal LAN features that a client would activate by default because of the ethernet connection, i.e. multicast packets.
B) You would not be able to easily "see" traffic between others on the same upstream or downstream channels (broadband), and therefore not be able to easily gain access to those users. A real easy way to illustrate this is: windows users wont see the whole neighborhood in network neighborhood, and Mac users wont see the whole neighborhood in the connect to server window.

Every network is different in some way, as administrators segment and subnet as they see fit. Sometimes the schemas don't even really make sense, and numerical IPv4 manipulation (very similar to what I understand you are trying to do) is a savvy way to crack a network or administer it (often the same thing). M company blocks port 80, 8080, and several others by default, so what you are trying to do may not truly give you the results you are looking for. For example, you use this method and see your webpage just fine, someone else wouldn't get there at all.

Bottom line is, if your truly want to see what others would, to really verify connections, you would, IMHO, need to actually try to access your box off-network.





[ Reply to This | # ]
Accessing a local DSL machine by its external IP
Authored by: vlipper on Apr 14, '04 05:33:18PM
Hello, Sorry for the very late reaction to all the comments above, but I had to lookup my own hint to get my setup working again. Let me try to explain why I use this setup.
My 'problem' is that if I point my browser to let's say 1.2.3.4, my ADSL IP number from my local machine, this will result in a timeout. Why? Probably because my browser will send a request to 1.2.3.4 through my ADSL modem, that tries to connect to 1.2.3.4 However this is not possible, since it has 1.2.3.4 as its external IP adress. (The modem has IP addresses: one being the gateway addres my local machine uses (10.0.0.138) and the address I got from my provider (1.2.3.4)).
When I duplicate my Ethernet connection and put 127.0.0.1 as the gateway for 1.2.3.4, all requests I make for 1.2.3.4 will reroute to 127.0.0.1 or localhost! This means that pointing my browser to 1.2.3.4 yields the same result as pointing my browser to 127.0.0.1 or localhost!

So why go all though all this trouble? Suppose I write some HTML with an URL in there that actually points to 1.2.3.4, I can now test this page without having to login to upload to HTML to the hosting server, and logging in to an external server just to test the page. Quite handy.
I think this can also be achieved by messing with routed, or whatever BSD commandline tool/config file. I just don't know.
Don't exactly know about the netmask settings. I doubt if it ever gets that far. Both 255.255.0.0 and 255.255.255.255 seem to work.

Hope this clears some fog. It is though to describe stuff you only need once in a while for testing, and is not mission critical, which is another way of saying that I don't really care, as long as it works.

---
Communication is coming on strong - j. hendrix

[ Reply to This | # ]

Accessing a local DSL machine by its external IP
Authored by: raisputin on Apr 15, '04 12:02:23AM

What a P.I.T.A that method is...

Personally I prefer to go to the advanced options in my Linksys router and forward port 80 to my internal IP address...takes about 3 steps and 3 seconds

internet---DSL---LINKSYS---Computer(s)

Just use forwarding on the Router and you will not need to go through all that Bullsh*t you just said :)

--Rais



[ Reply to This | # ]
Accessing a local DSL machine by its external IP
Authored by: vlipper on May 07, '04 03:42:53PM
What are you talking about? What I was doing may not be explained too clearly, but what you are saying makes no sense at all; is something totally different.
I'm not talking about port forwarding. Read, and at least try to understand what someone has to say, if you don't understand, ask, don't yell bullshit, and talk bullshit yourself!

---
Communication is coming on strong - j. hendrix

[ Reply to This | # ]

Accessing a local DSL machine by its external IP
Authored by: kmt on Apr 15, '04 03:38:42AM

The Hosts file (/etc) will handle this nicely... Just point from your local address to your remote address...a restart may be required.

One line is all it takes...

10.0.1.8 12.224.68.184



[ Reply to This | # ]