2

I want to setup a web server by using my wireless interface. Just wanted to know for testing purpose as I have setup LAMP. I'm connected to Internet through Wifi and at the same time I want to serve a website. I am following this website to setup LAMP: "https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu-16-04"

Where they told me to know "Server's Public IP Address" After entering the command it shows:- "Device "eth0" does not exist" as I'm using my Wireless Interface. Someone clear me this concept.

4
  • 1
    Possible duplicate of How do I find my internal ip address? Jan 24, 2017 at 12:29
  • ifconfig show the connected LAN and WLAN IP addresses. But these may be private IP address because you said it is a Wireless Interface. Not the public IP address I think. That mean you can access that IP from your internal network but not from external network by other users. Jan 24, 2017 at 12:36
  • @Vivek Mahajan Do you want to allow access to your server from WAN ?
    – fugitive
    Jan 24, 2017 at 12:58
  • 1
    Your public IP Address is probably not your IP Adress on your Wireless Interface. From your question it's unclear what you want. ifconfig or hostname -I will help you with WLAN Interface.
    – pLumo
    Jan 24, 2017 at 13:07

2 Answers 2

2

To find your public IP Address, either search google.com: https://www.google.dk/search?q=find+public+ip+address or use http://www.whatismypublicip.com/ or similar service.

1

As a 2021 addition to the answer given by Soren A, you do indeed need to use a service hosted on the (external) internet to get your public IP.

I like the site ifconfig.me since one can use it with command line tools. I usually use curl ifconfig.me.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .