How to get workgroup name in Samba? - samba

Given IP or host name, is there a way to get workgroup name by libsmbclient API or Samba command in Linux?
I already knew that how to browse workgroups, servers and shares by libsmbclient API.
Sometimes not all servers in LAN can be found by libsmbclient API. I don't know the root cause yet.

Related

DNS name for an Oracle Cloud public IP

I cannot figure out how to provide a DNS name to an IP address in Oracle cloud. Did not find a documentation. Went through the portal settings and some CLI documentation around networking. But did not find any.
It is quite straightforward in Azure. As the above screenshot shows.
Can anyone point me in right direction?
The hostname you provide at instance creation along with the subnet domain name becomes the instance's fully qualified domain name (FQDN). You can find more details in this chapter of the documentation: DNS in Your Virtual Cloud Network
In case of the Load Balancer's public IP, you can associate the public IP address with a friendly DNS name through any DNS vendor. You may also create and manage your DNS Zones within OCI Domain Name System, but you still need to register your domain name at a 3rd party DNS vendor. For more details on OCI DNS service, please see the DNS Service documentation.

Why different Google services has the same IP address?

I'm starting to study DNS system and the way it works. I'm using dig on ubuntu to solve some domain names and I'm trying with different Google services.
Even if services are totally different, it happened that I received the same IP address.
$ dig docs.google.com
;; ANSWER SECTION:
docs.google.com. 264 IN A 216.58.198.14
and
$ dig drive.google.com
;; ANSWER SECTION:
docs.google.com. 264 IN A 216.58.198.14
In other occasions, I received the same address trying to solve yet more services like mail.google.com or maps.google.com.
Can anybody help me and explain me the way it works? Does this have anything to do with time?
Thank you a lot.
First of all docs.google.com and drive.google.com are different domains.
And yes different domains can have the same ip address. This is called a Shared Web Hosting.
In name-based virtual hosting, also called shared IP hosting, the virtual hosts serve multiple hostnames on a single machine with a single IP address. This is possible because when a web browser requests a resource from a web server using HTTP/1.1 it includes the requested hostname as part of the request. The server uses this information to determine which web site to show the user. When you register/purchase your domain name on a particular "registrars name server", your DNS settings are kept on their server, and in most cases point your domain to the Name Server of your hosting provider. This Name Server is where the IP number (currently associated with your domain name) resides.

Using SSH tunnel to connect to remote MYSQL database from Node-Red

I have a set of data rolling out of Node-Red that I want to send to a remote MYSQL database. The Node-Red system is running on a Raspberry Pi. How do I make this work? I know how to it using Node.JS but im not sure how to do this in Node-Red. The IP-adress of the Pi is dynamic so simply authorizing its Ip address does not work sadly.
Thanks in advance!
EDIT for clarification:
I want to connect to a remote MYSQL database that is hosted by my webhosting. I have connected a Raspberry Pi to a battery, and I want to save this information in the aforementioned database. Since there will be several battery setups in different locations, I cannot save the data locally. So, one way or another I need to access the remote database through Node-Red. Authorizing one IP-address does't work, since the IP of the Raspberry Pi network is dynamic and thus changes. I think a SSH-Tunnel might be the solution, but I have no idea how to this in Node-Red, and google isnt very helpful.
OK, so as I said in the comments you can make a Username/Password pair for MySQL can be granted permission to any IP address (which is less secure if the username/password is compromised. Set the host to '%' to allow all hosts when setting up the grant options).
To reduce the risk you can restrict the Username/Password to a specific subnet. This could be a wifi network or the subnet associated to the piblic IP (it needs to be the public range as nearly all cellular ISPs use CGNAT) range of the cellular provider you may be using. (See this question for details How to grant remote access to MySQL for a whole subnet?).
If you want to use a SSH tunnel then this will normally be done outside Node-RED with the ssh command line e.g.
ssh -L localhost:3306:localhost:3306 remote.host.com
Then configure the Node-RED MySQL node to point to localhost.
Since the connection will look like it's coming from localhost on the MySQL machine you need make sure the Username/Password is locked down to a that host.
You will probably also want to set up public/private key authentication for the ssh connection.
You may be able to run the ssh command in the node-red-daemon node, which should restart the connection if it gets dropped.

could not connect with google cloud storage

I have just created cloud storage on google for mysql database.
I have added local IP address and server's IP address in authorization (under access control).
It's getting connected in mysql work bench in my local machine. But, it's not connecting with the website which is running on windows azure platform.
Which IP address am I supposed to use in access control?
Website is in basic package of azure.
This is a relatively non-trivial thing to achieve as the GCP services need to know about the public source IP of the Azure service. Azure's IP surface is pretty wide so you'd be unlikely to successfully connect the two. You'll be unlikely to be able use just a single source IP address.
You may be better off looking at a VPN connection out of an Azure VNet to your GCP environment.
To be honest, trying to build any form of performant web experience that hosts the web and data tiers in different public clouds is going to be extremely challenging.
Actually I resolved this issue by opening ticket in azure support.
They have outbound IP addresses range available online. We need to provide those IP addresses to third party access control.
I am sharing you that link here.
https://social.msdn.microsoft.com/Forums/azure/en-US/fd53afb7-14b8-41ca-bfcb-305bdeea413e/maintenance-notice-upcoming-changes-to-increase-capacity-for-outbound-network-calls?forum=windowsazurewebsitespreview
Choose those IP addresses which are associated with your website.

Can't access filab instance virtual machine

I have a problem accessing our filab instance Virtual Machine through SSH. I have created the keypair pem file, the instance, associate IP and create security groups without incidences but I can't access it (always timeout).
The FILAB CLOUD Dashboard status is ACTIVE and RUNNING
All appears to be correct but I can't access. Does anyone know why?
All questions related to insfrastructure administration in FIWARE should be sent by mail to fiware-lab-help#lists.fiware.org.