This shows you the differences between two versions of the page.
linux:network:ipv6 [2011/12/03 06:55] tkilla created |
linux:network:ipv6 [2015/11/15 15:34] (current) tkilla |
||
---|---|---|---|
Line 5: | Line 5: | ||
**check your firewalls! -- use ip6tables - same syntax as iptables** | **check your firewalls! -- use ip6tables - same syntax as iptables** | ||
+ | ===== Network config ===== | ||
+ | OVH / | ||
+ | |||
+ | |||
+ | iface eth0 inet6 static | ||
+ | address main_ip_v6_here | ||
+ | netmask 64 | ||
+ | post-up /sbin/ip -family inet6 route add gateway_v6_heref dev eth0 | ||
+ | post-up /sbin/ip -family inet6 route add default via mgateway_v6_here | ||
+ | pre-down /sbin/ip -family inet6 route del default via gateway_v6_here | ||
+ | pre-down /sbin/ip -family inet6 route del gateway_v6_here dev eth0 | ||
+ | | ||
+ | ## additional ipv6 ips - in ipv6 on the same interface eth0 (no eth0.x aliases): | ||
+ | post-up / | ||
+ | pre-down / | ||
+ | | ||
+ | ## OR add another eth0 iface for an additional ipv6 | ||
+ | iface eth0 inet6 static | ||
+ | address 2001: | ||
+ | netmask 64 | ||
+ | |||
+ | Manually add an IP: | ||
+ | ip -6 addr add ipv6_ip_here/ | ||
+ | |||
+ | |||
+ | If it doen't work in / | ||
+ | |||
+ | #!/bin/sh | ||
+ | sleep 2 | ||
+ | / | ||
+ | exit 0 | ||
+ | |||
+ | ===== Nginx config ===== | ||
+ | |||
+ | The ipv6 must be up and pingable, then you can add a listen directive in a server{.. block (keep the brackets): | ||
+ | |||
+ | listen | ||
+ | |||
+ | SSL: | ||
+ | listen | ||
+ | |||
+ | Nginx reload doesn' | ||
+ | |||
+ | |||
+ | \\ | ||
+ | ===== Useful commands ===== | ||
scan ipv6 on localhost: | scan ipv6 on localhost: |