From c652d68855f233aecbb49a67f193316977fb76e2 Mon Sep 17 00:00:00 2001 From: Adar Nimrod <nimrod@shore.co.il> Date: Fri, 15 Dec 2023 17:40:15 +0200 Subject: [PATCH] Router; Route traffic to the Nintendo Switch. --- Ansible/roles/router/files/dhcpd.conf | 5 +++++ Ansible/roles/router/files/hosts | 1 + Ansible/roles/router/files/pf.conf | 4 ++++ Ansible/roles/router/files/unbound/shore.co.il.conf | 1 + 4 files changed, 11 insertions(+) diff --git a/Ansible/roles/router/files/dhcpd.conf b/Ansible/roles/router/files/dhcpd.conf index 8596a93..d143d9d 100644 --- a/Ansible/roles/router/files/dhcpd.conf +++ b/Ansible/roles/router/files/dhcpd.conf @@ -27,4 +27,9 @@ subnet 192.168.3.0 netmask 255.255.255.0 hardware ethernet C4:41:1E:AA:03:4A; fixed-address mr8300.shore.co.il; } + host nintendoswitch + { + hardware ethernet 70:f0:88:4c:c4:fe; + fixed-address NintendoSwitch; + } } diff --git a/Ansible/roles/router/files/hosts b/Ansible/roles/router/files/hosts index a9f8f98..cc1fbbb 100644 --- a/Ansible/roles/router/files/hosts +++ b/Ansible/roles/router/files/hosts @@ -4,3 +4,4 @@ 192.168.3.12 xbmc.shore.co.il xbmc kodi.shore.co.il kodi 192.168.3.13 mr8300.shore.co.il mr8300 192.168.3.17 host01.shore.co.il host01 +192.168.3.20 NintendoSwitch diff --git a/Ansible/roles/router/files/pf.conf b/Ansible/roles/router/files/pf.conf index e333dae..26efdfb 100644 --- a/Ansible/roles/router/files/pf.conf +++ b/Ansible/roles/router/files/pf.conf @@ -49,6 +49,10 @@ pass in quick proto tcp to (egress:0) port { smtp, submission, imaps } rdr-to ho pass out quick proto tcp to host01.shore.co.il port { submission, smtp, imaps } received-on ingress nat-to ingress set prio ( 4, 6 ) pass in quick proto { tcp, udp } to (egress:0) port bittorrent rdr-to kodi.shore.co.il set queue bulk set prio 1 +# Nintendo Switch +pass in quick proto tcp to (egress:0) port {6667, 12400, 28910, 29900, 29901, 29920} rdr-to NintendoSwitch +pass in quick proto udp to (egress:0) port 45000:65535 rdr-to NintendoSwitch + # Allowed NAT and proxying #pass in quick on ingress inet proto tcp to egress:network port www divert-to localhost port wwwproxy pass in quick on ingress inet proto tcp to port ftp divert-to localhost port ftpproxy diff --git a/Ansible/roles/router/files/unbound/shore.co.il.conf b/Ansible/roles/router/files/unbound/shore.co.il.conf index 419f24b..31fb793 100644 --- a/Ansible/roles/router/files/unbound/shore.co.il.conf +++ b/Ansible/roles/router/files/unbound/shore.co.il.conf @@ -7,3 +7,4 @@ server: local-data: "mr8300.shore.co.il. A 192.168.3.13" local-data: "host01.shore.co.il. A 192.168.3.17" local-data: "smtp.shore.co.il. A 192.168.3.17" + local-data: "nintendoswitch. A 192.168.3.20" -- GitLab