How to disable IPv4 and enable only IPv6 on arm Linux target? - sockets

I am testing bind9 dns server for AAAA records. I would like to disable IPv4 to stop dns requests going to my default ipv4 dns server.
In the resolv.conf i have added
domain mydomain.com
nameserver xxxx:xxxx:xxxx:xxxx:xxxx::xxxx
search mydomain.com
When I try to call
getaddrinfo("mydomain.com",NULL,&hints,&res);
to resolve the
domain name to IPv6 address , I see error message
"No Route to Host".
The same program can resolve to IPv6 address when i run on the Ubuntu PC.
I have tried to test
nslookup mydomain.com
server: 10.1.xx.xx
address 1: 10.1.xx.xx dnsserver.com
nslookup: can't resolve 'mydomain.com'
The nslookup command works correctly on Linux PC.
Is there any thing additional I need to do in the /etc/network. or else where?
Edit:
The issue is resolved with changes in the bind9 reverse zone configuration file.

Related

changed local IP. Where am I supposed to update IP for minikube

I don't know why, but my local IP changed from 192.168.1.100 to 192.168.1.125
So, when I start minikube, it starts well, but none of kubectl command works, it gives me:
Unable to connect to the server: dial tcp 192.168.1.100:8443: connect: no route to host
Where am I supposed to change the IP in my local computer ( ubuntu 19.04 ) ?
minikube update-context should fix this issue for you.
Quoting the docs:
The update-context command retrieves the IP address of the running cluster, checks it with IP in kubeconfig, and corrects kubeconfig if incorrect
https://minikube.sigs.k8s.io/docs/reference/commands/update-context/

Format and content of lines in pg_hba.conf file

I installed Postgres 9.3 yesterday on Ubuntu 18.04 (using the Ubuntu package index). I need to add lines to the pg_hba.conf file to allow pgAdmin access on port 5432.
For example, I need to add a line in this format:
hostssl database user address auth-method [auth-options]
My first question is what should I use for the the IP address in the "address" field. I am using pgAdmin on my local computer (Windows) to access my Ubuntu 18.04 server in the cloud, but I don't have a static IP address, so entering my IP address won't do. What IP address should I put in the address field for outside access from my local computer? It's not clear from the docs at https://www.postgresql.org/docs/11/auth-pg-hba-conf.html.
My second question is how do I indicate port 5432 in the line above? I believe that's the default listener port for Postgres, so doesn't it need to be specified in the line above?
What you have to specify in pg_hba.conf is not an IP address, but a netmask: an IP address followed by a number between 0 and 32 that tells how many bits of the address are significant.
For example
12.23.34.99/24
matches all IP addresses between 12.23.34.0 and 12.23.34.255.
Find out in which range your possible IP addresses are and use that.
pg_hba.conf determines which authentication method is used for an incoming connection. It comes into play after the TCP connection to server port 5432 has been established.
To configure on which TCP port PostgreSQL should listen, edit postgresql.conf and restart PostgreSQL.

Not able add extra IP to vps server in OVH

I am trying to add extra IP to my OVH vps server by following there guide but getting this error.
I am using cent os 6 - 64bit using this guide to add IP to my vps server
https://docs.ovh.com/gb/en/dedicated/network-ipaliasing/
"# ifup eth0:0
ipcalc: bad netmask: 255.255.255.255
ipcalc: bad netmask: 255.255.255.255
is already in use for device eth0...79
/".or: an inet prefix is expected rather than "54.xx.xx.xxx
.for eth0:0g address 54.xx.xx.xxx
bind: Cannot assign requested address"
Where am I wrong? Please help
Is it a dedicated server or VPS? Ask the OVH support if they allow additional IP on a VPS
Try using Prefix instead of NETMASK

mongodb listen to localhost and lan ip only

I have an Ubuntu server with mongodb installed. Is it possible to configure mongodb in such a way that I can connect to it using only localhost and its LAN IP address.
The default mongo configuration works fine for connecting using localhost:
bind_ip = 127.0.0.1
If I change to the LAN IP, then I am only able to connect using that IP, and not using localhost:
bind_ip = 10.10.10.10
If I try to add both, then I get an address in use error and doesn't start:
bind_ip = 127.0.0.1, 10.10.10.10
If I remove the bind_ip setting, then both work, but I am also able to connect with the servers external IP (which I do not want).
#bind_ip = 127.0.0.1, 10.10.10.10
So, how can I tell mongo to listen on the local interface, but allow connections from both localhost and its LAN IP?
With the help of #wdberkeley's comment, I realized that the problem was the space after the , in the list of IP addresses the bind to. However, it seems that this issue only affects the old config file format (not YAML).
# This Works:
bind_ip = 127.0.0.1,10.10.10.10
# This doesn't work:
bind_ip = 127.0.0.1, 10.10.10.10
Bind to address 0.0.0.0 this will allow it to answer regardless of the IP address being used and even on machines that have multiple network cards with different IP addresses

Couldn't ping Oracle Solaris 11 via hostname

I have various linux systems running under one dhcp server and two dns servers.
Someone told that you never register your hostname to dhcp server , you get ip from dhcp server and then register hostname to dns server (correct me if this is wrong) .
I generally install vmwaretools on the linux machines and configure the /etc/hosts file for hostname and /etc/resolv.conf for domain and dns servers .
The problem is with Oracle Solaris 11 Express 64 bit , even though the hostname is properly being displayed using hostname and /etc/hosts and /etc/resolv.conf file is correct , i'm unable to ping it via hostname (although pinging via ip address works fine) .
The same settings were done on rhel , suse , centos , oracle linux and they are pingable using hostname , what could be the problem ? (both these files for these os's are same) .
It seems like the dns server is unable to pick hostname for oracle solaris but for others it does , since i dont have access to dhcp/dns server , what changes do i require on solaris for it to work ?