I have configured a server with Gentoo 64 bits that it has IPv4 and IPv6 and they are working well. But I don't know how specify the IPv6 of the server in /etc/hosts file. With or without "/64" final?:  ... ipv4.XXX.XXX.XXX nsXXXXXXX.ip-XXX-XXX-XXX.eu  ipv6:XXxX:XX:xxxX::/64 nsXXXXXXX.ip-XXX-XXX-XXX.eu ....   or  .... ipv4.XXX.XXX.XXX nsXXXXXXX.ip-XXX-XXX-XXX.eu  ipv6:XXxX:XX:xxxX:: nsXXXXXXX.ip-XXX-XXX-XXX.eu ....   ?
123332
Pasted below this question is a sample of a /etc/hosts file from a Linux (CentOS) and a Windows machine. The Linux file has two tabbed entries after the IP address (that is localhost.localdomain localhost) and Windows has only one. If I want to edit the hosts file in Windows to have the machine name (etest) instead of localhost, I simply replace the word localhost with the machine name I want. The machine need not be part of a domain.  In a Linux machine, the two entries localhost.localdomain and localhost seems to indicate that I will need the machine to be part of a domain. Is this true?  Can I simply edit both entries to etest so that it will read:  127.0.0.1       etest etest   or is it required that I substitute one entry with a domain name?  Additionally, please let me know what the second line of the /etc/hosts file on the Linux machine is for.  ::1     localhost6.localdomain6 localhost6   hosts file on a Linux machine:  # Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1       localhost.localdomain localhost ::1     localhost6.localdomain6 localhost6   hosts file on a windows machine:  # Copyright (c) 1993-1999 Microsoft Corp. # # This is a sample HOSTS file used by Microsoft TCP/IP for Windows. # # This file contains the mappings of IP addresses to host names. Each # entry should be kept on an individual line. The IP address should # be placed in the first column followed by the corresponding host name. # The IP address and the host name should be separated by at least one # space. # # Additionally, comments (such as these) may be inserted on individual # lines or following the machine name denoted by a '#' symbol. # # For example: # #      102.54.94.97     rhino.acme.com          # source server #       38.25.63.10     x.acme.com              # x client host  127.0.0.1       localhost
28257
On AWS Ubuntu Server, I wrote C++ Hello, World program:  #include &lt;iostream&gt; using namespace std;  int main(){         cout&lt;&lt;"Hello, World!"&lt;&lt;endl;         return 0; }   And compiled it:  ubuntu@ip-xxxxx:~/dev/c++$ g++ -c ./test.cc -o out ubuntu@ip-xxxxx:~/dev/c++$ chmod a+x out ubuntu@ip-xxxxx:~/dev/c++$ ./out -bash: ./out: cannot execute binary file: Exec format error ubuntu@ip-xxxxx:~/dev/c++$ file ./out ./out: ELF 64-bit LSB  relocatable, x86-64, version 1 (SYSV), not stripped ubuntu@ip-xxxxx:~/dev/c++$ uname -a Linux ip-xxxxx 3.13.0-48-generic #80-Ubuntu SMP Thu Mar 12 11:16:15 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux ubuntu@ip-xxxxx:~/dev/c++$ gcc --version gcc (Ubuntu 4.8.4-2ubuntu1~14.04) 4.8.4   It seems that architecture x86-64 is the same each other. What is the problem here? Do I have to add more C++ flags?
80501
I am new to this, so sorry if its obvious. I am running a Debian server and installing the likes of UWSGI, NGinx etc on there. The configurations keep talking about pointing to "sockets".  In the build options I seem to be able to specify where the sockets for each program go. By default it looks like most of them go in /tmp (not all of them).  Is this a good place for them to go? I'm trying to keep things as organized as possible but just bunging them in /tmp doesn't seem like the best option.
110914
According to my IPv6 tunnelbroker  the world will end in approximately 712 days when we finally run out of IPv4 addresses.  Would it be possible to enable IPv6 access to the Stack Exchange family of websites?
71244
Every time I try to use sudo I get this:  sudo: unable to resolve host ubuntu-server   My /etc/hosts file:  127.0.0.1       localhost 127.0.1.1       ubuntu-server  # The following lines are desirable for IPv6 capable hosts  ::1     ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes FF02::2 ip6-allrouters   /etc/hostname has:  ubuntu-server   I think there is some other setting that causes the unable to resole host error, but I cannot find these.
104534
As a newbie Postfix user, I've gotten so far and now I am stuck with a SMALL problem.  I would like to configure my local network servers to send alerts and like using the following:   From address: hostname@example.com From name: Hostname   I can get #1 to work fine using smtp_generic_maps  The problem is that on my email client, the name is listed as "root" - as in the header shows the following:  Date: Sun, 29 Jul 2012 13:21:01 -0400 (EDT) From: zeus@example.com (root) To: undisclosed-recipients:;   I'd like to change it to From: zeus@example.com (Zeus)  I imagine that this can be done in the headers_check, but so far I haven't gotten anything to work and before I waste a ton of time trying to get this to work, I'd like to make sure I am on the right track.  My aliasing and generic_maps are set up correctly (As far as I can see and know - the results are correct!).  I just want to change that last bit in the From field to reflect the hostname.  I would also like to add something in the subject of the outgoing messages for easy filtering - something like Subject: [Zeus.domain] - "Original Subject".
53730
I decided that I'll learn python tonight :) I know C pretty well (wrote an OS in it) so I'm not a noob in programming so everything in python seems pretty easy, but I don't know how to solve this problem : let's say I have this address:    Now how can I create two strings from this, one containing the "base" name of the server, so in this example it would be   and another containing the thing without the last filename, so in this example it would be   . Also I of course know the possibility to just find the 3rd and last slash respectively but maybe you know a better way :] Also it would be cool to have the trailing slash in both cases but I don't care since it can be added easily. So anyone has a good, fast, effective solution for this? Or is there only "my" solution, finding the slashes?  Thanks!
21027
Does anyone have a regular expression handy that will match any legal DNS hostname or IP address?  It's easy to write one that works 95% of the time, but I'm hoping to get something that's well tested to exactly match the latest RFC specs for DNS hostnames.
71216
How does one disable IPv6 completely (for all interfaces, resp. for the whole machine?  Keep in mind, I don't want any kind of GUI solution.    OS in question:   Linux Mint 18.x Cinnamon 64-bit GNU/Linux Debian 9.x Cinnamon 64-bit
89281
We have dozens of virtual machines in several data centers around the world. When upgrading an Ubuntu VM from 14 to 16 (as a step toward upgrading them to Ubuntu 18), the network interface names change. I am aware of this, and I know why they change, so that is not my question. My question is where does the number (the 33 in ens33, the 192 in ens192, etc.) come from? I have read many StackExchange questions and answers about what to do to get the server working: that is not the problem. What I want to know is how to predict what the ens### will be before the server is upgraded to Ubuntu 16. I have looked at lshw and lspci, and I can't see any reason why these numbers are chosen.  Please: where does the 192 (or 33, or anything else) come from?
32167
I (think) that I've configured a static IP address in /etc/network/interfaces:  # The primary network interface  auto eth0  iface eth0 inet static     address 10.1.1.2     netmask 255.255.255.0     network 10.1.1.0     broadcast 10.1.1.255     gateway 10.1.1.1   And I change the file /etc/resolv.conf to include the desired nameservers.   Then I restart networking sudo /etc/init.d/networking restart  But after some hours resolv.conf always reverts back to the DHCP nameserver.   I should also say that this is Ubuntu Server with only l0 and eth0 interfaces.
56269
What is the best way to add a DNS wildcard record for a domain?  I want example.net, www.example.net, a.b.c.www.example.net, ... going to one server.  Now I use:  example.net.    60  IN  A       1.2.3.4 *.example.net.  60  IN  CNAME   example.net.   Is it possible to do it simpler?
47185
I have finally migrated to 12.04 from 7.10. I have one last part to complete but I am stumped. I am using Puppet on each server, and in the past I have included a nameserver address and a search domain name for the puppetmaster in resolv.conf.   search puppetmaster.com nameserver 192.168.1.XXX   In 12.04 resolv.conf gets overwritten when rebooted. I cannot use a static IP for these, so using the /etc/network/interfaces to help me out is a nill point.  # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) #     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN nameserver 127.0.0.1   Is there a way to get resolvconf to handle this either in the head, tail or base? If there is, are there any examples I can use to tweak on my server.   Any help is much appreciated.
61830
I am using Ubuntu 12.04.  My /etc/network/interfaces file consists of:    # The loopback network interface   auto lo   iface lo inet loopback     # The primary network interface   auto eth0  iface eth0 inet static   address 192.168.1.58   gateway 192.168.1.1 network 192.168.1.0   broadcast 192.168.1.255 dns-nameservers 66.212.63.228 66.212.48.10     I ran the command: /etc/init.d/networking restart  Which responded with:   *Running /etc/init.d/networking restart is deprecated because it may not enable again some interfaces   *Reconfiguring network interfaces...   RTNETLINK answers: File exists   Failed to bring up eth0   [ OK ]     Next I ran ping google.com and received:    ping: unknown host google.com   I am not sure if my interfaces refreshed. How do I properly configure my network with my static DNS addresses?
95270
I am trying to Load test on the link:  and getting this error message:   Expected closing bracket for IPv6 address at index 28  Please could you help  Tuti
92922
I'm having trouble writing a regular expression that matches valid IPv6 addresses, including those in their compressed form (with :: or leading zeros omitted from each byte pair).    Can someone suggest a regular expression that would fulfill the requirement?  I'm considering expanding each byte pair and matching the result with a simpler regex.
40428
In sysctl, the /proc/sys/net/ipv[46]/conf/ keys have the following subkeys: all, default, and a key for each network interface. For example, on a machine with a single network interface eth0, it will look like this:  iserv ~ # ll /proc/sys/net/ipv[46]/conf/ /proc/sys/net/ipv4/conf/: insgesamt 0 dr-xr-xr-x 0 root root 0 12. Sep 23:30 all/ dr-xr-xr-x 0 root root 0 12. Sep 23:30 default/ dr-xr-xr-x 0 root root 0 12. Sep 23:30 eth0/ dr-xr-xr-x 0 root root 0 12. Sep 23:30 lo/  /proc/sys/net/ipv6/conf/: insgesamt 0 dr-xr-xr-x 0 root root 0 12. Sep 23:30 all/ dr-xr-xr-x 0 root root 0 12. Sep 23:30 default/ dr-xr-xr-x 0 root root 0 12. Sep 23:30 eth0/ dr-xr-xr-x 0 root root 0 12. Sep 23:30 lo/   All the respective settings exist in each key separately. For example, if I want to disable IPv6 Router Advertisements with the accept_ra value, this value exists four times:  iserv ~ # sysctl -a 2&gt;/dev/null | grep "accept_ra " net.ipv6.conf.all.accept_ra = 1 net.ipv6.conf.default.accept_ra = 1 net.ipv6.conf.lo.accept_ra = 1 net.ipv6.conf.eth0.accept_ra = 1   My question now is: which of these values do I need to change? I figured all (to change all existing interfaces) and default (to change all new interfaces that may appear later), but changing these still leaves the value at 1 for lo and eth0:  iserv ~ # sysctl -w net.ipv6.conf.all.accept_ra=0 net.ipv6.conf.all.accept_ra = 0 iserv ~ # sysctl -w net.ipv6.conf.default.accept_ra=0 net.ipv6.conf.default.accept_ra = 0 iserv ~ # sysctl -a 2&gt;/dev/null | grep "accept_ra "   net.ipv6.conf.all.accept_ra = 0 net.ipv6.conf.default.accept_ra = 0 net.ipv6.conf.lo.accept_ra = 1 net.ipv6.conf.eth0.accept_ra = 1   Will the machine now accept Router Advertisements on eth0, or will it not?