it-artikel:linux:how-to-configure-or-add-a-static-ipv6-address-to-your-ipv4-ubuntu-server-with-bridged-interfaces
Differences
This shows you the differences between two versions of the page.
— | it-artikel:linux:how-to-configure-or-add-a-static-ipv6-address-to-your-ipv4-ubuntu-server-with-bridged-interfaces [2022-08-31 12:30] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== How to configure or add a static IPv6 address to your IPv4 Ubuntu Server with bridged interfaces? ====== | ||
+ | |||
+ | I ran a UBUNTU Server 14.04/16.04 LTS on a computer on a small SOHO as an router/ | ||
+ | |||
+ | < | ||
+ | [PCs]==(LAN)==> | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | +-- internal (bridged) ethernet interface " | ||
+ | </ | ||
+ | |||
+ | On Servers in general, especially on the **internal interface (enp1s0)** i prefer a **static IP configuration** for IPv4 and IPv6 using private IP adresses / ULA (unique local address). | ||
+ | |||
+ | On the WAN/ | ||
+ | |||
+ | Of course, on the LAN Side of the ISP Router (i call it **DMZ** in this scenario) we'll often still receive unrouteable dynamic private IPv4 addresses and a (supposedly routeable) dynamic IPv6 address for every connected device. | ||
+ | |||
+ | However often these ISPs wont offer us enough control over our own LAN, over how we want to manage the IP adresses, the assignment, the DNS, hostnames etc, so this one of many reasons why i prefer my own Linux Server/ | ||
+ | |||
+ | So to achieve all that, we start with configuring the network interfaces on our Linux Server, using UBUNTU 16.04 LTS in this example. | ||
+ | |||
+ | <note important> | ||
+ | |||
+ | ===== Network Configuration: | ||
+ | |||
+ | My ISPs **routers LAN Interface has 192.192.178.1** as a fixed IPv4 address. | ||
+ | |||
+ | **My Servers external ethernet interface " | ||
+ | |||
+ | The **LAN Interface of the Linux Server** i defined to get **192.192.0.7** and **fd00: | ||
+ | |||
+ | <note important> | ||
+ | |||
+ | **This is how the file looks like for this case:** | ||
+ | |||
+ | <file config / | ||
+ | # This file describes the network interfaces available on your system | ||
+ | # and how to activate them. For more information, | ||
+ | |||
+ | source / | ||
+ | |||
+ | # The loopback network interface | ||
+ | auto lo | ||
+ | iface lo inet loopback | ||
+ | |||
+ | ############################### | ||
+ | # Internal LAN NIC - onboard - enp1s0 | ||
+ | # | ||
+ | iface enp1s0 inet manual | ||
+ | |||
+ | ############################### | ||
+ | # USB tethered emergency phone Internet NIC - enp0s19f2u3i and enp0s19f2u4 | ||
+ | # | ||
+ | auto enp0s19f2u3 | ||
+ | auto enp0s19f2u4 | ||
+ | iface enp0s19f2u3 inet dhcp | ||
+ | iface enp0s19f2u4 inet dhcp | ||
+ | |||
+ | |||
+ | ############################### | ||
+ | # Internet NIC - 1gbps realtek pci - enp5s8 | ||
+ | # | ||
+ | auto enp5s8 | ||
+ | #iface enp5s8 inet dhcp | ||
+ | iface enp5s8 inet static | ||
+ | address 192.168.178.20 | ||
+ | gateway 192.168.178.1 | ||
+ | |||
+ | # | ||
+ | # | ||
+ | dns-search lan transfer | ||
+ | |||
+ | |||
+ | ############################### | ||
+ | # Internal LAN Bridge Interface on enp1s0 | ||
+ | # | ||
+ | auto br0 | ||
+ | #iface br0 inet dhcp | ||
+ | iface br0 inet static | ||
+ | address 192.168.0.7 | ||
+ | network 192.168.0.0 | ||
+ | netmask 255.255.255.0 | ||
+ | #gateway 192.168.0.1 | ||
+ | bridge_ports enp1s0 | ||
+ | bridge_stp off | ||
+ | bridge_fd 0 | ||
+ | bridge_maxwait 0 | ||
+ | |||
+ | dns-nameservers 192.168.0.7 | ||
+ | dns-search lan transfer | ||
+ | |||
+ | auto br0:0 | ||
+ | iface br0:0 inet6 static | ||
+ | address fd00: | ||
+ | netmask 64 | ||
+ | |||
+ | dns-nameservers fd00: | ||
+ | ############################### | ||
+ | |||
+ | </ | ||
+ | |||
+ | I hope this helps someone. | ||
+ | |||
+ | |||
+ | |||
+ | {{tag> | ||
+ | |||
+ | |||