1

I have researched and found dozens of ways to determine the public IP on a standard Rasbian or UbuntuMate Distro. Because I am working in UbuntuCore I do not have access to any thing that I cannot install through the snap package installer. (background) I am creating a networked surveillance system for a class project but have some limitations due to the high security of the school/test network. I've narrowed my search to a package/tool to perform http get request though I'm not sure I'm looking in the correct direction

1
  • Welcome to Raspberry Pi SE. Feel free to take the tour at raspberrypi.stackexchange.com/Tour that will help you get the most from this site. Have you tried just using your web browser? Many sites will feed it back to you like GRC's Shields-Up and bearsmyip.com – SDsolar Apr 20 '18 at 2:21
2

After a very specific search (netcat what is my ip) I found this post. My solution was the second answer: echo 'GET /' | nc icanhazip.com 80 worked and gave me exactly what I was looking for... Hope someone else finds this useful!

2
  • 2
    The command does not work for me on Raspbian 2018-03-13. I get the error message usage: nc [...]. – Ingo Apr 20 '18 at 10:27
  • Hey sorry about that. Its not a version issue I forgot to include the port number in the original post is all. Thanks this was helpful – Brothaman Jun 13 '18 at 17:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.