Whitelist bei Sport forwarding?

1 Antwort

In den üblichen consumer Routern ist das nicht möglich.

Am einfachsten wäre es im dem freigegebenen Gerät (vorrausgesetzt es läuft linux darauf) eine iptables-regel anzulegen.

iptables -N xxx # create a new chain
iptables -A xxx --src 1.2.3.4 -j ACCEPT  # allow 1.2.3.4
iptables -A xxx --src 1.2.3.5 -j ACCEPT  # allow 1.2.3.5
iptables -A xxx --src 1.2.3.6 -j ACCEPT  # allow 1.2.3.6
iptables -A xxx -j DROP  # drop everyone else
iptables -I INPUT -m tcp -p tcp --dport 777 -j xxx  # use chain xxx for packets coming to TCP port 777

https://serverfault.com/questions/146569/iptables-how-to-allow-only-one-ip-through-specific-port

eine "einfacherere" Lösung fällt mir aktuell nicht ein,

evtl gibt es eine einfache Lösung, wenn du beschreibst warum du genau so ein verhalten erreichen möchtest.

Woher ich das weiß:Hobby – Betreibe einen eigene Server seit 2016