Jan
4
2009
“What is my IP?” A frequent question while we all remain under the oppression of NAT. Of course most of you are familiar with whatismyip.com and friends, but did you know you can do the same thing yourself very easily? All you need is a webserver (across the NAT in question, of course).
Here’s a CGI version:
#!/bin/sh
echo "Content-type: text/plain"
echo
echo $REMOTE_ADDR
If CGI is a pain but you have PHP:
<?php
header("Content-type: text/plain");
echo $_SERVER['REMOTE_ADDR'];
?>
Both of these are suitable for scripting, e.g.
#!/bin/bash
URL=http://fugal.net/ip.cgi
echo Your IP address is `curl -s "$URL"`
1 comment | tags: address, bash, curl, ip, linux, nat, php, REMOTE_ADDR, sh
Jun
7
2006
Last night’s presentation on OpenSER and MediaProxy went well, I think. We
talked a lot about SIP and NAT, and looked at some sample configurations. The
question came up about why or when one should want to deal with SER, and my
answer is either when you need the scalability of SER, or when you want to use
MediaProxy. There are other reasons why you might want to user SER, but IMHO
MediaProxy is the first and most important reason to use SER. Unless you like
troubleshooting NAT problems…
The slides and sample files are at http://hans.fugal.net/utaug. There are
hyperlinks in the slides, but I couldn’t figure out how to get them to stand
out, so watch that mouse cursor. The sample
openser.cfg has not been tested,
but was pruned from a working config. If you see a problem with it let me know
and I’ll fix it.
no comments | tags: mediaproxy, nat, openser, ser, sip, utaug, voip