 |
 |
What is the computer's real IP address when using an airport base station?
|
 |
|
 |
|
Junior Member
Join Date: Mar 2003
Status:
Offline
|
|
I have Apple Remote Desktop and i want to connect to another computer. The other computer is on an airport base station network. When i go into his network control panel, it says his IP address is 10.0.1.2. This is the standard IP that is assigned to all computers on that network. Where on his computer would i go to find out the REAL IP address (the one i need to use for Apple Remote Desktop)?
|
|
POWER MAC G4
Dual 1.42GHz, 2.0GB RAM, 120GB HD
NVIDIA GeForce4 Titanium
20.1" APPLE Cinema Display
CANON i950 Printer
iSight Camera
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Jan 2001
Status:
Offline
|
|
Originally posted by Gummi Bear:
I have Apple Remote Desktop and i want to connect to another computer. The other computer is on an airport base station network. When i go into his network control panel, it says his IP address is 10.0.1.2. This is the standard IP that is assigned to all computers on that network. Where on his computer would i go to find out the REAL IP address (the one i need to use for Apple Remote Desktop)?
You've got a couple of options to find it. Either go to www.whatismyip.com and it'll tell you the IP address. The other is going into the Airport Admin Utility and it'll tell you there.
In order to get into the computer when it's behind the ABS, you have to set up port mapping. It's a royal pain in the ass sometimes, but I can walk you through it if you want.
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Sep 2000
Location: Cupertino, CA USA
Status:
Offline
|
|
Here's a script that queries whatismyip.com and displays the current IP address in a dialog.
Thanks to torifile for the suggestion!
Code:
try
set the temp_folder to (path to temporary items folder) as string
set the target_path to (temp_folder & "GETIPTEMP.TXT")
tell application "URL Access Scripting"
download "http://whatismyip.com" to file target_path
end tell
set the HTML_source to read file target_path
set x to the offset of "<TITLE>" in the HTML_source
set y to the offset of "</TITLE>" in the HTML_source
set this_address to word 4 of (text (x + 7) thru (y - 1) of the HTML_source)
display dialog this_address buttons {"OK"} default button 1 giving up after 15
on error the error_message
display dialog error_message buttons {"OK"} default button 1
end try
(Last edited by Sal; Jul 23, 2003 at 01:02 AM.
)
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Jan 2001
Status:
Offline
|
|
Originally posted by Sal:
Here's a script that queries whatismyip.com and displays the current IP address in a dialog.
Thanks to torifile for the suggestion!
Code:
try
set the temp_folder to (path to temporary items folder) as string
set the target_file to (temp_folder & "GETIPTEMP.TXT")
tell application "URL Access Scripting"
download "http://whatismyip.com" to file target_file
end tell
set the HTML_source to read file target_file
set x to the offset of "<TITLE>" in the HTML_source
set y to the offset of "</TITLE>" in the HTML_source
set this_address to word 4 of (text (x + 7) thru (y - 1) of the HTML_source)
display dialog this_address buttons {"OK"} default button 1 giving up after 15
on error the error_message
display dialog error_message buttons {"OK"} default button 1
end try
Ah, Sal. You've gotta show me up by whipping out your AppleScript prowess, don't you???  Thanks for the script. It'll come in handy. 
|
|
|
| |
|
|
|
 |
|
 |
|
Moderator Emeritus 
Join Date: Mar 2001
Location: Austin, MN, USA
Status:
Offline
|
|
Originally posted by Sal:
Here's a script that queries whatismyip.com and displays the current IP address in a dialog.
Thanks to torifile for the suggestion!
Code:
try
set the temp_folder to (path to temporary items folder) as string
set the target_file to (temp_folder & "GETIPTEMP.TXT")
tell application "URL Access Scripting"
download "http://whatismyip.com" to file target_file
end tell
set the HTML_source to read file target_file
set x to the offset of "<TITLE>" in the HTML_source
set y to the offset of "</TITLE>" in the HTML_source
set this_address to word 4 of (text (x + 7) thru (y - 1) of the HTML_source)
display dialog this_address buttons {"OK"} default button 1 giving up after 15
on error the error_message
display dialog error_message buttons {"OK"} default button 1
end try
The code in the script is just as useful as what the code does! I didn't know you could download HTML source to a file and I didn't know you could read text in from a file. I've tried similar things but couldn't find the right ways to do it.
Thanks!
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Sep 2000
Location: Cupertino, CA USA
Status:
Offline
|
|
Originally posted by Xeo:
The code in the script is just as useful as what the code does! I didn't know you could download HTML source to a file and I didn't know you could read text in from a file. I've tried similar things but couldn't find the right ways to do it.
Thanks!
You're welcome!
URL Access Scripting is one of those unsung heroes of the OS. As you can see from its dictionary, it can upload and download, and do POST and GET.
Code:
URL Access: Scripting for URL Access.
download: Downloads a specified URL to a specified file
download string -- URL to download from
to file specification -- the downloaded file location
[replacing yes/no] -- whether to replace an existing file (default: no)
[unpacking boolean] -- whether to decode or decompress the downloaded item (default: true)
[progress boolean] -- whether to display a modal progress dialog (default: false)
[form data string] -- form data
[directory listing boolean] -- get a directory listing? (default: false)
[download directory boolean] -- download as an entire directory (default: false)
[authentication boolean] -- show authentication dialog (default: false)
[Result: file specification] -- the downloaded file
upload: upload the file to the URL.
upload file specification -- the file to upload
to string -- the URL of the receiving server
[replacing yes/no] -- whether to replace an existing file (default: no)
[progress boolean] -- whether to display a modal progress dialog (default: false)
[binhexing boolean] -- whether to binhex before uploading or not (default: true)
[upload directory boolean] -- upload as an entire directory (default: false)
[authentication boolean] -- show authentication dialog (default: false)
[Result: boolean]
The read command is part of the file read/write suite in the Standard Additions scripting addition dictionary. You can read and parse data from just about any file.
Code:
read: Read data from a file that has been opened for access
read anything -- the reference number, alias, or file reference of the file to read
[using delimiter plain text] -- the value that separates items to read…
[using delimiters a list of plain text] -- …or up to 2 values that separate items to read
[as type class] -- the form in which to read and return data
[for double integer] -- the number of bytes to read from current position; if omitted, read until the end of the file
[before plain text] -- read up to but not including this character…
[until plain text] -- …or read up to and including this character
[from double integer] -- starting from this position; if omitted, start at last position read from
[to double integer] -- stopping at this position
Result: anything -- the data read from the file
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|