Public ip is not shown in ifconfig - Ubuntu 16.04


 
Thread Tools Search this Thread
Operating Systems Linux Ubuntu Public ip is not shown in ifconfig - Ubuntu 16.04
# 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 Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

[CUPS] printers not shown after a while

I'm currently running a CUPS server and it shows the printers on other computers just fine, but after a while they disappear. I found out, that restarting /etc/init.d/cups-browsed fixes the problem (for about 15min). When the printers disappear, the cups-browsed service is still running, so I... (0 Replies)
Discussion started by: Gajeela
0 Replies

2. Solaris

Using dd command no MB/s shown

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 (2 Replies)
Discussion started by: eeisken
2 Replies

3. Shell Programming and Scripting

What are public keys in ssh and how do we create the public keys??

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 (1 Reply)
Discussion started by: ravi3cha
1 Replies

4. Solaris

sun cluster3.2, d3 and d8 are shown as failed

Hello, This is a 2 node sun cluster 3.2 on solaris 10(x86) I am using an unique ~512M disk (c0d1) on each node and slice 6 on this disk for globaldevices. While everything looks like fine, the 'Fail' is bothering me. @ tommy_sun1 @tommy_sun -bash-3.00# cldevice refresh... (10 Replies)
Discussion started by: upengan78
10 Replies

5. Solaris

what FS is shown in df -kh

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... (3 Replies)
Discussion started by: upengan78
3 Replies

6. Shell Programming and Scripting

Help!! how to get the filename as be shown?

I am trying to obtain the file name (not including sub file name), however, I still cannot have the string output. :( 2 existed files at /tmp, AAA.new and BBB.last Originally, the output result is needed to be shown as follows, ex: SYSTEM NEW LAST =================== 01 ... (8 Replies)
Discussion started by: Jones Lin
8 Replies

7. Solaris

preventing the banner from being shown

Is there a way to supress the banner from being shown when you log in? (1 Reply)
Discussion started by: BG_JrAdmin
1 Replies

8. UNIX for Dummies Questions & Answers

working directory shown

Hi, How do I get my working directory always shown in the unix editor? i.e if I am now at /Home/abc/xyz/, I want to see this absolute path displayed ( and now only display when I type pwd). thanks for the kind help. Regrads (3 Replies)
Discussion started by: swchee
3 Replies
Login or Register to Ask a Question

Featured Tech Videos