| HOSTNAME | DNS RECORD(S) | IPV4 ADDRESS | IPV6 ADDRESS |
|---|---|---|---|
| R-CORE | (none) | 198.51.100.1/29, 198.51.100.9/29, 198.51.101.1/25 | 2001:db8:39:1::1/64, 2001:db8:39:2::9/64, 2001:db8:39:3::1/64 |
| Allowed options: - FRRouting (recommended) with OSPFv2 for IPv4 and OSPFv3 for IPv6, or - FRRouting with BGP for IPv4 and IPv6. |
The following configurations on R‑CORE are already done: - IPv4 addressing on WAN networks - NTP server: ntp.skylink.dk - DNS server for skylink.dk - Web server for www.skylink.dk Do not break existing services.
Настройка
hostnamectl hostname R-CORE
timedatectl set-timezone Europe/Stockholm
vi /etc/resov.conf.head
search skylink.dk
domain skylink.dk
nameserver 10.10.20.11
vi /etc/network/interfaces
auto ens3
iface ens3 inet static
address 198.51.100.1/29
iface ens3 inet6 static
address 2001:db8:39:1::1/64
auto ens4
iface ens4 inet static
address 198.51.100.9/30
iface ens4 inet6 static
address 2001:db8:39:2::9/64
auto ens5
iface ens5 inet static
address 198.51.101.1/25
iface ens5 inet6 static
address 2001:db8:39:3::1/64
sysctl net.ipv4.ip_forward=1 >> /etc/sysctl.d/test.conf # це типо на уровне ядро, будет диномически для всего включатся
sysctl net.ipv4.conf.all.forwarding=1 >> /etc/sysctl.d/test.conf # це типо для интерфейсов которые при загруке были
sysctl net.ipv6.conf.all.forwarding=1 >> /etc/sysctl.d/test.conf
sysctl -p /etc/sysctl.d/test.confOSPF
apt install frr -y
vi /etc/frr/daemons
ospfd=yes
ospf6d=yes
service frr start
service frr status
vtysh
conf t
router ospf
network 198.51.100.0/29 area 0
network 198.51.100.8/30 area 0
router ospf6
ospf6 router-id 1.1.1.1
exit
int ens3
ipv6 ospf6 area 0
int ens4
ipv6 ospf6 area 0
exit
exit
clear ipv6 ospf6 process
do wr
# мб перезапустить че-нить демона или устройствоchrony
apt install chrony -y
vi /etc/chrony/chrony.conf
local statum 2
bindacqdevice ens3
bindacqdevice ens4
bindacqdevice ens5
allow all
service chrony startbind
apt install bind9 -y
cd /etc/bind/
vi named.conf.options
allow-query {any;};
listen-on {any;};
listen-on-v6 {any;};
vi named.conf.local
zone "skylink.dk" {
type master;
file "/var/lib/bind/skylink.dk";
};
vi /var/lib/bind/skylink.dk
$TTL 604800
@ IN SOA skylink.dk. root.skylink.dk. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS skylink.dk.
@ IN A 198.51.100.1
@ IN A 198.51.100.9
@ IN AAAA 2001:db8:39:1::1
@ IN AAAA 2001:db8:39:2::9
ntp IN A 198.51.100.1
ntp IN A 198.51.100.9
ntp IN AAAA 2001:db8:39:1::1
ntp IN AAAA 2001:db8:39:2::9
www IN A 198.51.100.1
www IN A 198.51.100.9
www IN AAAA 2001:db8:39:1::1
www IN AAAA 2001:db8:39:2::9
service named restartAPACHE
apt install apache2 -y
mkdir /var/www/site
vi /var/www/site/index.html
<h1> Hello! </h1>
vi /etc/apache2/sites-enabled/000-default.conf
ServerName www.skyling.dk # Перед и после VirtualHost
DocumentRoot /var/www/site/NFTABLES
nft add table nat
nft add chain nat postrouting '{type nat hook postrouting priority 100;}'
nft add rule nat postrouting oifname { ens3, ens4 } masquerade
echo "flush ruleset" > /etc/nftables.conf
nft list ruleset >> /etc/nftables.conf