0

I am setting up a web server on my Ubuntu host. To be specifically, it is gdbgui. According to its help info, I can use --host to specify the host IP it listens on. And on my host, I have below IP configuraton:

docker0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.18.0.1  netmask 255.255.0.0  broadcast 172.18.255.255
        ether 02:42:9f:02:c9:97  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enp89s0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 1c:69:7a:a5:c2:e0  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device memory 0x6a200000-6a2fffff

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 163716  bytes 56247108 (56.2 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 163716  bytes 56247108 (56.2 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlo1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet **192.168.50.69**  netmask 255.255.255.0  broadcast 192.168.50.255 <========= HERE
        inet6 fe80::3fd:752e:5ded:467f  prefixlen 64  scopeid 0x20<link>
        ether 70:9c:d1:21:c5:f0  txqueuelen 1000  (Ethernet)
        RX packets 270277  bytes 117510355 (117.5 MB)
        RX errors 0  dropped 15  overruns 0  frame 0
        TX packets 93011  bytes 45155962 (45.1 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

I want to use the 192.168.50.69 so my other machines in the same LAN can access it.

But it always listens on 127.0.0.1. Even I explicitly specify the --host option for gdbgui.

gdbgui --host 192.168.50.69 ...

How can I change it? I guess this question is not specific to gdbgui.

Thanks!

1 Answer 1

1

Problem solved for gdbgui.

I need to specify the host name rather than the host IP for the --host option. Like below:

gdbgui --host myBox ...

Then I need to modify the /etc/hosts file to specify the IP address for the host name. Like below:

192.168.50.69   myBox
1
  • I'm glad you found it, but it's strange that the program will accept a name (found in /etc/hosts) but not an IP address directly!
    – Jeff Schaller
    Feb 6 at 14:42

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.