Public ip is not shown in ifconfig - Ubuntu 16.04


Login or Register to Reply

 
Thread Tools Search this Thread
# 1  
Old 11-24-2018
Public ip is not shown in ifconfig - Ubuntu 16.04

Hello,
I have just installed ubuntu 16.04 into my pc.
Locally everything works fine, it takes data from internet, I am also able to connect to apache in the same local network. When I try to reach from mobile network, I can't establish ssh, apache site is not displaying in my browser etc.

Ifconfig:
Code:
root@house:/etc/network# ifconfig
enp1s0    Link encap:Ethernet  HWaddr 00:25:22:dd:27:c9
          inet addr:192.168.1.99  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::225:22ff:fedd:27c9/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:831 errors:0 dropped:0 overruns:0 frame:0
          TX packets:637 errors:0 dropped:0 overruns:0 carrier:1
          collisions:0 txqueuelen:1000
          RX bytes:450056 (450.0 KB)  TX bytes:70571 (70.5 KB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:76 errors:0 dropped:0 overruns:0 frame:0
          TX packets:76 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:5589 (5.5 KB)  TX bytes:5589 (5.5 KB)

interfaces:
Code:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto enp1s0
iface enp1s0 inet static
        address 192.168.1.99
        netmask 255.255.255.0
        gateway 192.168.1.1
        dns-nameservers 8.8.8.8 8.8.4.4

I also set static ip as DMZ host in router. To be sure I rebooted both pc and router but nothing changes.


Could you please let me know what am I missing?

Thanks in advance
Boris
# 2  
Old 11-24-2018
What exactly do you mean by "reach from mobile network"? What be the "public IP" you mention in the thread title?
What is your access point(s)? What addresses do you use to connect via WLAN (if at all)?
# 3  
Old 11-24-2018
If I'm understanding your post correctly, you can access your web server from your LAN but not from a mobile device connected to the internet??

Firstly, your router connected to the internet must be configured to accept in-bound connections (which by default many routers are not), and secondly, having accepted the in-bound connection the router needs to be configured what to do with it. This is usually configured with "port forwarding" to allow the router to forwarding the request to a specific ip address (your web server). When the in-bound request carries that port number, that tells the router where to direct that internet packet.

The router could, of course, be configured to direct all in-bound connection requests to the same ip address (i.e. your web server).

Does that sound like an answer to your question? Or have I completely misunderstood?
# 4  
Old 11-24-2018
Hello Rudic,
I am trying to connect from remote ip, not from my local network.

Hello Hicksd8,
Yes, that's what I am trying to imply.
I also opened port forwarding rules for ssh port and apache ports.
My ssh port is 61200

Code:
DomainNameServer(DNS) 	WAN2_INTERNET 	TCP/UDP 	53 	53 	53 	53 	192.168.1.99 	Active 	
SecureShellServer(SSH) 	WAN2_INTERNET 	TCP 	 	61200 	61200 	61200 	61200 	192.168.1.99 	Active 	
WebServer(HTTP) 	WAN2_INTERNET 	TCP 	 	8000 	8000 	8000 	8000 	192.168.1.99 	Active 	
WebServer(HTTP)2 	WAN2_INTERNET 	TCP 	 	80 	80 	80 	80 	192.168.1.99 	Active


Thanks in advance
Boris
# 5  
Old 11-24-2018
You opened those ports where? What about the router itself? If a connection request arrives from the internet to the router, the router must be configured as to what to do with it.

If you think the router is configured correctly how about running wireshark on your LAN to see if the router tries to forward correctly?
# 6  
Old 11-24-2018
Does the router incorporate a firewall? Switch it off temporarily.

Your can connect to your web server locally so the router configuration must be the prime suspect.
# 7  
Old 11-24-2018
How is your mobile device connected to the internet?
Login or Register to Reply

|
Thread Tools Search this Thread
Search this Thread:
Advanced Search

More UNIX and Linux Forum Topics You Might Find Helpful
[CUPS] printers not shown after a while Gajeela UNIX for Dummies Questions & Answers 0 11-18-2015 05:19 AM
Bash-Completion, one list shown, the other not. sea UNIX for Advanced & Expert Users 2 04-14-2015 07:29 AM
Using dd command no MB/s shown eeisken Solaris 2 10-31-2013 12:55 PM
Files copied to FTP server not shown RHCE Red Hat 7 04-02-2013 05:28 AM
Mail not properly shown in some email clients muazrs Shell Programming and Scripting 3 02-09-2013 11:15 AM
Connections not shown in netstat output AIX_user IP Networking 1 04-18-2011 03:04 PM
Memory usage shown is high radiatejava UNIX for Advanced & Expert Users 2 01-20-2011 08:17 PM
What are public keys in ssh and how do we create the public keys?? ravi3cha Shell Programming and Scripting 1 09-01-2010 02:39 AM
Programatically read 'size' shown in top? douglaskbell Solaris 3 02-22-2010 03:18 AM
sun cluster3.2, d3 and d8 are shown as failed upengan78 Solaris 10 07-16-2009 11:38 AM
what FS is shown in df -kh upengan78 Solaris 3 06-05-2008 05:41 PM
Help!! how to get the filename as be shown? Jones Lin Shell Programming and Scripting 8 07-18-2006 02:24 AM
preventing the banner from being shown BG_JrAdmin Solaris 1 05-22-2006 07:39 PM
working directory shown swchee UNIX for Dummies Questions & Answers 3 05-11-2006 05:05 AM