Doku: Router-Setup (DHCP/DNS/NAT für enp7s0 10.0.0.0/24)
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
# Nur auf dem LAN-Interface lauschen (DHCP + DNS) — niemals auf enp3s0 (WAN/öffentlich)!
|
||||
interface=enp7s0
|
||||
bind-interfaces
|
||||
except-interface=enp3s0
|
||||
except-interface=lo
|
||||
|
||||
# DHCP für 10.0.0.0/24
|
||||
dhcp-range=10.0.0.100,10.0.0.200,255.255.255.0,12h
|
||||
dhcp-option=option:router,10.0.0.1
|
||||
dhcp-option=option:dns-server,10.0.0.1
|
||||
dhcp-authoritative
|
||||
|
||||
# DNS: als Forwarder für den internen DNS/Search-Domain der Institution
|
||||
domain=fhi.mpg.de
|
||||
no-resolv
|
||||
server=141.14.128.1
|
||||
@@ -0,0 +1,22 @@
|
||||
# This file describes the network interfaces available on your system
|
||||
# and how to activate them. For more information, see interfaces(5).
|
||||
|
||||
source /etc/network/interfaces.d/*
|
||||
|
||||
# The loopback network interface
|
||||
auto lo
|
||||
iface lo inet loopback
|
||||
|
||||
# The primary network interface
|
||||
allow-hotplug enp3s0
|
||||
iface enp3s0 inet static
|
||||
address 141.14.140.128/20
|
||||
gateway 141.14.128.128
|
||||
# dns-* options are implemented by the resolvconf package, if installed
|
||||
dns-nameservers 141.14.128.1
|
||||
dns-search fhi.mpg.de
|
||||
|
||||
# LAN interface (Router/Gateway/DHCP/DNS für 10.0.0.0/24)
|
||||
allow-hotplug enp7s0
|
||||
iface enp7s0 inet static
|
||||
address 10.0.0.1/24
|
||||
@@ -0,0 +1,22 @@
|
||||
#!/usr/sbin/nft -f
|
||||
|
||||
flush ruleset
|
||||
|
||||
table inet filter {
|
||||
chain input {
|
||||
type filter hook input priority filter;
|
||||
}
|
||||
chain forward {
|
||||
type filter hook forward priority filter;
|
||||
}
|
||||
chain output {
|
||||
type filter hook output priority filter;
|
||||
}
|
||||
}
|
||||
|
||||
table inet nat {
|
||||
chain postrouting {
|
||||
type nat hook postrouting priority srcnat;
|
||||
ip saddr 10.0.0.0/24 oifname "enp3s0" masquerade
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
net.ipv4.ip_forward = 1
|
||||
Reference in New Issue
Block a user