Jump to content

Gns3 external IP

AvidPontoon

I am using software called gns3 to build networks.

 

I have the need to find out devices external ip from within an gns3 internal network. This would be like a pc behind a router doing NAT.

Please could someone tell me if there is a way that you can echo out the clients external ip in php so I can add a web server to one of my virtual networks within gns3 so I can visit it on some devices and find their external ip’s for testing?

 

Note that my gns3 networks are not connected to the internet so can’t connect externally.

 

Thanks in advance

Link to comment
Share on other sites

Link to post
Share on other sites

It would be nothing related to GNS3, you'd have to implement what sites like whatsmyip.com do. 

 

When you create a web server within GNS3, your client acts exactly how what would happen going to eg. whatsmyip.com.

 

You'd establish a TCP connection, http get, web server responds but will update it's webpage with the external IP address that you used to query the http data. You might be looking for something more like: https://www.virendrachandak.com/techtalk/getting-real-client-ip-address-in-php-2/ where you implement the ability for the web server to retrieve the clients IP address, this should work is GNS3 as expected.

I'm going to put a link to my PC specs which actually aren't my PC specs and I cry myself to sleep everyday so I can have these PC specs but I can't afford these PC specs so PC specs PC specs PC specs PC specs PC specs PC specs.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×