Skip to content

a tool to retrieve your external ip address from the router

Notifications You must be signed in to change notification settings

asjadsyed/pftools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 

Repository files navigation

#pftools Note that these instructions are out of date for the moment, until i get some free time to fix them pftools is a simple suite of tools to do things like retrieve your external ip address from the router
make port forwardings

getip relies on two things:

  • that your router supports UPnP
  • that you have a CLR (Common Language Runtime) installed, such as the .NET Framework for Windows, or Mono for Linux/Mac OS X/Windows.

on linux, you can just install the package mono-runtime to install mono
$ sudo apt-get install mono-runtime

mono is also downloadable from their website:

to download and run the pftools utilities:


  open a terminal
$ cd Downloads
$ wget https://github.com/asjadsyed/pftools/archive/master.zip -O pftools.zip
$ unzip pftools.zip
$ rm pftools.zip
$ cd pftools-master/Linux/
$ mono getip

getip will now search for routers until it finds one
if it doesn't, you either:

  • can't access the internet, or
  • your router doesn't support the UPnP Protocol

to install the pftools programs so that you can run them from any folder:
sudo cp getip /usr/bin/

to download and compile getip:

  • first, make sure you have the mono-devel package
$ sudo apt-get install mono-devel
* then download and prepare to compile

$ cd Downloads
$ wget https://github.com/asjadsyed/getip/archive/master.zip -O getip.zip
$ unzip getip.zip
$ rm getip.zip
$ cd getip-master/Source/
* compile

$ mcs GetIP.cs -r:Mono.Nat.dll -out:getip
you now have a binary named getip, but it needs to have the Mono.Nat.dll file in the same directory as it. you can merge the binary so that it is standalone and contains Mono.Nat within it using ILRepack, but this has alreday been done for you in the Linux/ folder

getip relies on Mono.Nat, a UPnP library, to communicate with your router
you do not need to install anything for this
for the linux binary, Mono.Nat has been combined into the original binary using ILRepack
on windows, you need to make sure the Mono.Nat.dll file stays in the same folder as GetIP.exe

About

a tool to retrieve your external ip address from the router

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published