Public ip is not shown in ifconfig - Ubuntu 16.04


Login or Register to Reply

 
Thread Tools Search this Thread
# 1  
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  
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  
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  
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  
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  
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  
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
Using dd command no MB/s shown
eeisken
Hi I am using the dd command on solaris 10 and the output doesn't include the MB/s statistic that you get in Linux, is this not available or am I missing a switch of some sort #dd if=/dev/urandom of=/perf_test/file.txt bs=1048576 count=500 0+500 records in 0+500 records out... Solaris
2
Solaris
What are public keys in ssh and how do we create the public keys??
ravi3cha
Hi All, I am having knowledge on some basics of ssh and wanted to know what are the public keys and how can we create and implement it in connecting server. Please provide the information for the above, it would be helpful for me. Thanks, Ravindra... Shell Programming and Scripting
1
Shell Programming and Scripting
what FS is shown in df -kh
upengan78
Hi, On solaris 10, t5120, I don't understand what are the last 2 file systems so last 2 file systems what are they, why are they getting shown and also confused why the swap is shown so many times and different size when I set it to 16 G at the time of installing solaris 10. ( rest...... Solaris
3
Solaris