How I can configure the sonar.web.host with a dynamic IP? Would I need to change the properties file every time the IP changes?
# Binding IP address. For servers with more than one IP address, this property specifies which
# address will be used for listening on the specified ports.
# By default, ports will be used on all IP addresses associated with the server.
sonar.web.host=xxx.xx.xx.xx
Leave sonar.web.host commented-out and SonarQube will listen on all NICs, irrespective of their IP address.
Related
What is a Dynamic Host Configuration Protocol(DHCP) server? and What is the difference between DHCP server and
a Domain Name Server(DNS) server?
DHCP (Dynamic Host Configuration Protocol)
is for assigning IP addresses (or other network parameters) to devices so they can communicate with each other.
If you for example want to establish a wireless connection, then you need amongst other things request a DHCP server that assigns your device an IP address so you can communicate with other nodes.
DNS (Domain Name System)
is a hierarchical decentralised service which associates informations with domain names.
If you for example want to request google.com you first need to figure out what the corresponding IP address is. Therefore you request a DNS server.
DHCP is a layer 2 network protocol that will offer IP address from its pool to device not connected to the network, but who wanted to. It's used in LAN network.
DNS is like a dictionary. Consider you are trying to go to stackoverflow.com, so your device isn't able to know what's the IP address of stackoverflow.com. He will ask to DNS server to found the IP address for him.
DHCP = IP dynamic allocation
DNS = IP retrieval of an existing and registered device
In man page about SO_REUSEADDR(man 7 socket):
When the listening socket is bound to INADDR_ANY with a specific port then it is not possible to bind to this port for any local address. Argument is an integer boolean flag.
But in Unix Network Programming, I find:
SO_REUSEADDR allows a new server to be started on the same port as an existing server that is bound to the wildcard address, as long as each instance binds a different local IP address. This is common for a site hosting multiple HTTP servers using the IP alias technique (Section A.4). Assume the local host's primary IP address is 198.69.10.2 but it has two aliases: 198.69.10.128 and 198.69.10.129. Three HTTP servers are started. The first HTTP server would call bind with the wildcard as the local IP address and a local port of 80 (the well-known port for HTTP). The second server would call bind with a local IP address of 198.69.10.128 and a local port of 80. But, this second call to bind fails unless SO_REUSEADDR is set before the call. The third server would bind 198.69.10.129 and port 80. Again, SO_REUSEADDR is required for this final call to succeed.
Aren't they contradictory?
They are not in conflict. The second quote provides a way around the default behaviour specified by the first paragraph.
On localhost a program is calling an external IP in a specific port. I'm monitoring this via wireshark. Standard TCP connection.
What's the easiest way to route the traffic to the external IP back to localhost on a specific port?
Thanks
Configure your network card to have a second IP address - the external one.
When the IP packet gets routed, it turns out that it needs to be delivered locally.
If you listen locally to any address, you'll pick it up.
Alternatively you can listen locally to the specific IP address.
I'm having a static IP address, say:127.254.x.x
Is it possible to access my web application from some other place by just replacing the local host with my IP???
Also, what will I replace the local host with if Ithe server is on a wifi network.? I.e. The router assigns a different ip to my server(because of dhcp) other than my original static ip. In this case should it be
192.x.x.2:8090
Or
127.254.x.x
Any help is appreciated.
I'm having a static IP address, say:127.254.x.x Is it possible to access my web application from some other place by just replacing the local host with my IP???
Yes, provided you configure it correctly.
Normally, you have a broadband modem/router which talks to the outside world, and provides a NAT network range to your devices. So you have an external IP address (the one the modem/router uses to talk to the outside world), and probably several internal IP addresses (for your phone, your laptop, your other laptop, your Kindle, etc.).
So to access a web server on your internal network from the outside world, you have to do two things:
Configure your modem/router to "forward" traffic it receives on the desired port (port 80 for HTTP) to the server on your network. How you do this depends on your modem/router. Look for "port forwarding."
When trying to access the app from the outside world, use your external, not internal, IP address.
So for instance, if your external IP address is 222.111.222.12, and the IP address of the machine you're using as your web server is 127.154.0.23, then you tell your modem/router that whatever traffic it receives on port 80 it should forward to 127.154.0.23 (this configuration may be by IP address, or may be by the MAC address of the network card in your web server machine; it depends on the modem/router). Then to view your app from outside your network, you go to http://222.111.222.12 (or whatever name you assign that IP address to in DNS).
I've created a receive location using the HL72x pipeline with MLLP. I can send hl7 traffic to the server if I set the BizTalk MLLP configuration host property of the receive location to the IP address of the server, but if I set the value to localhost or 127.0.0.1, biztalk will not appear to listen on the respective port. Using a port scanner, I can only see an open port if the mllp host property of the receive location is set to the IP address of the server. I don't want to reference the actual ip address of the server, I'd rather us local host, as then if the IP changes, nothing has to be reconfigured. Is there some other way to do this?
You should be able to set the Host parameter to an IP address of 0.0.0.0. That will cause the receive location to listen for all inbound traffic on the specified port, regardless of the source's IP address.