forked from nyanloutre/nixos-config
nat: config de test
This commit is contained in:
parent
35e0d8da56
commit
d9c0013502
@ -42,20 +42,13 @@ in
|
|||||||
|
|
||||||
# eno1 -> VLAN100 -> Internet
|
# eno1 -> VLAN100 -> Internet
|
||||||
# eno2 -> LAN
|
# eno2 -> LAN
|
||||||
# eno3 -> accès serveur
|
# eno3 -> Legacy client DHCP
|
||||||
# eno4 -> Wifi ?
|
# eno4 -> Pas utilisé
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
hostName = "loutreos"; # Define your hostname.
|
hostName = "loutreos"; # Define your hostname.
|
||||||
hostId = "7e66e347";
|
hostId = "7e66e347";
|
||||||
|
|
||||||
# firewall.trustedInterfaces = [ "eno3" ];
|
|
||||||
# interface.eno3 = {
|
|
||||||
# ipv4.addresses = [
|
|
||||||
# { address = "10.30.0.5"; prefixLength = 24; }
|
|
||||||
# ];
|
|
||||||
# };
|
|
||||||
|
|
||||||
vlans.bouyges = {
|
vlans.bouyges = {
|
||||||
id = 100;
|
id = 100;
|
||||||
interface = "eno1";
|
interface = "eno1";
|
||||||
@ -76,32 +69,10 @@ in
|
|||||||
# NAT bouyges <-> eno2
|
# NAT bouyges <-> eno2
|
||||||
nat = {
|
nat = {
|
||||||
enable = true;
|
enable = true;
|
||||||
externalInterface = "bouyges";
|
# À remplacer par bouyges
|
||||||
|
externalInterface = "eno3";
|
||||||
# Permet d'utiliser le SNAT plus rapide au lieu de MASQUERADE
|
# Permet d'utiliser le SNAT plus rapide au lieu de MASQUERADE
|
||||||
# externalIP = "0.0.0.0";
|
# externalIP = "0.0.0.0";
|
||||||
forwardPorts = [
|
|
||||||
# FTP
|
|
||||||
{ destination = "10.30.0.5"; proto = "tcp"; sourcePort = 20; }
|
|
||||||
{ destination = "10.30.0.5"; proto = "tcp"; sourcePort = 21; }
|
|
||||||
{ destination = "10.30.0.5"; proto = "tcp"; sourcePort = "64000:65535"; }
|
|
||||||
# SSH
|
|
||||||
{ destination = "10.30.0.5"; proto = "tcp"; sourcePort = 22; }
|
|
||||||
# Mails
|
|
||||||
{ destination = "10.30.0.5"; proto = "tcp"; sourcePort = 25; }
|
|
||||||
{ destination = "10.30.0.5"; proto = "tcp"; sourcePort = 143; }
|
|
||||||
{ destination = "10.30.0.5"; proto = "tcp"; sourcePort = 587; }
|
|
||||||
{ destination = "10.30.0.5"; proto = "tcp"; sourcePort = 4190; }
|
|
||||||
# HAProxy
|
|
||||||
{ destination = "10.30.0.5"; proto = "tcp"; sourcePort = 80; }
|
|
||||||
{ destination = "10.30.0.5"; proto = "tcp"; sourcePort = 443; }
|
|
||||||
# Matrix
|
|
||||||
{ destination = "10.30.0.5"; proto = "tcp"; sourcePort = 8448; }
|
|
||||||
# Syncthing
|
|
||||||
{ destination = "10.30.0.5"; proto = "tcp"; sourcePort = 22000; }
|
|
||||||
# Transmission
|
|
||||||
{ destination = "10.30.0.5"; proto = "tcp"; sourcePort = 51413; }
|
|
||||||
{ destination = "10.30.0.5"; proto = "udp"; sourcePort = 51413; }
|
|
||||||
];
|
|
||||||
internalIPs = [ "10.30.0.0/16" ];
|
internalIPs = [ "10.30.0.0/16" ];
|
||||||
internalInterfaces = [ "eno2" ];
|
internalInterfaces = [ "eno2" ];
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user