gentoo configure ipv6 and ipv4 dual stack

Due to lack of documentation I had a bit of trouble getting both default gateways to work. It is vital that both gateways are on a separate line in the config file. You must also use the CIDR notation for ipv4 too. You cannot mix the netmask and CIDR entries. This is my config file which works without a problem. The only think I have changed are the IP addresses I used the ones reserved for documentation.

 

/etc/conf.d/net

 

###############################################################################################
config_eth0="198.51.100.2/24 2001:db8::2/48"
###############################################################################################
routes_eth0="default via 198.51.100.1
default via 2001:db8::2"
###############################################################################################

You also need to make sure that you kernel supports ipv6 and you need iproute2. To check this run

# ip -6 addr show lo
1: lo: mtu 16436
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
(The above lines show things are working)

If you can see your loopback address ::1 you should be good to restart your network card to apply the new configuration. Or if you needed to recompile you kernel a reboot may be necessary. After that is done you can test the ipv6 connection with icmp6.

# ping6 -n google.com
PING google.com(2a00:1450:4008:c01::8b) 56 data bytes
64 bytes from 2a00:1450:4008:c01::8b: icmp_seq=1 ttl=50 time=29.8 ms
64 bytes from 2a00:1450:4008:c01::8b: icmp_seq=2 ttl=50 time=28.5 ms
64 bytes from 2a00:1450:4008:c01::8b: icmp_seq=3 ttl=50 time=28.3 ms
64 bytes from 2a00:1450:4008:c01::8b: icmp_seq=4 ttl=50 time=28.4 ms
^C
--- google.com ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3009ms
rtt min/avg/max/mdev = 28.352/28.779/29.817/0.637 ms

That looks good we received an answer from google via ipv6. Another thing you should know is that you will need to create iptables rules for ip6tables. In the standard configuration all packets will be accepted which you might not want (default policy accept). Now you could think about reconfiguring your web services to use your ipv6 connection. You may also need to emerge your software with the ipv6 use flag to make use of the new connection. A useful tool for calculating ipv6 networks and subnets is net-misc/sipcalc Sipcalc is an advanced console-based IP subnet calculator. Have fun with your new ipv6 connection 🙂

Downloading missing apt repo keys from behind a firewall

After installing a ubuntu 12.04 (precise) server on a host behind a firewall. I tried to update the apt repositories to install some software. And received the following error message:

W: GPG error: http://extras.ubuntu.com precise Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 16126D3A3E5C1192

So I tried to fetch the missing key with:

apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 16126D3A3E5C1192

Which did not work because the firewall was blocking port 11371 which is needed to fetch the apt keys. What a pain there must be a way to fetch the keys via another port. Maybe port 80 which should be open in most cases. Then I came across this command which did the magic:

apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 16126D3A3E5C1192

This command fetches the missing keys via port 80 which worked for me. If you need more than one key just add them to the –recv-keys line seperated by a space. Thats it.

Plesk Panel Remove Facebook and Promos from Panel

To get rid of the horrible facebook like button and promo’s in your plesk panel do the following.

1. Create or edit a file with you favourite editor called:

/opt/psa/admin/conf/panel.ini

And add the following content:


showLikeLink=false
[rating]
enabled=false
[promos]
enabled=off

Thats it no more facebook and rubbish in your admin interface enjoy.