Ho il mio modem via cavo (10.0.0.1) sul mio iMac (10.0.0.36) e il mio iMac (10.0.0.36) con un IP condiviso di Internet (bridge100 192.168.2.1) sulla mia macchina debian (192.168.2.34) e tutto ciò funziona perfettamente. Vorrei ora inoltrare la porta 80 da Internet attraverso il bridge sul mio iMac alla mia macchina debian ...
10.0.0.1:80 <-> 10.0.0.36:8080 <-> 192.168.2.1:8080 <-> 192.168.2.34:80
Ho trovato il seguente link , che portami a
rdr on bridge100 inet proto tcp from any to 10.0.0.36 port = 8080 -> 192.168.2.34 port 80
Tuttavia, non funziona ... Ora nel link stanno andando a localhost, e ho trovato questo link regola-to-redirect-tutto-traffico-a-un-specifico-porta-ip che dice che potrei aver bisogno di qualcosa di simile
pass out route-to (bridge100 192.168.2.1) from any to 10.0.0.36
Ma non sono stato in grado di ottenere pfctl
per analizzare correttamente la riga precedente
Qualche idea su come posso inoltrare da 10.0.0.36:80 < - > 192.168.2.1 < - > 192.168.2.34:80?
Modifica: il modem / router via cavo è un TG852G di Xfinity ...
Modifica: pfdump
r scrub-anchor "com.apple/*" all fragment reassemble
r anchor "com.apple/*" all
r anchor "usr.home/*" all
n nat-anchor "com.apple/*" all
n rdr-anchor "com.apple/*" all
A com.apple
A com.apple.internet-sharing
A usr.home
com.apple r anchor "200.AirDrop/*" all
com.apple r anchor "250.ApplicationFirewall/*" all
com.apple A com.apple/200.AirDrop
com.apple A com.apple/250.ApplicationFirewall
com.apple/200.AirDrop A com.apple/200.AirDrop/Bonjour
com.apple/200.AirDrop/Bonjour r pass in on p2p0 inet6 proto udp from any to any port = 5353 keep state
com.apple/200.AirDrop/Bonjour r pass out on p2p0 proto tcp all flags any keep state
com.apple.internet-sharing r scrub-anchor "base_v4" all fragment reassemble
com.apple.internet-sharing r anchor "base_v4" all
com.apple.internet-sharing n nat-anchor "base_v4" all
com.apple.internet-sharing n rdr-anchor "base_v4" all
com.apple.internet-sharing A com.apple.internet-sharing/base_v4
com.apple.internet-sharing/base_v4 r scrub on en1 all no-df fragment reassemble
com.apple.internet-sharing/base_v4 r scrub on bridge100 all no-df max-mss 1460 fragment reassemble
com.apple.internet-sharing/base_v4 r scrub on bridge100 proto esp all no-df fragment reassemble
com.apple.internet-sharing/base_v4 r pass on en1 all flags any keep state
com.apple.internet-sharing/base_v4 r pass on en1 proto esp all no state
com.apple.internet-sharing/base_v4 r pass on bridge100 all flags any keep state rtable 7
com.apple.internet-sharing/base_v4 n nat on en1 inet from 192.168.2.0/24 to any -> (en1:0) extfilter ei
com.apple.internet-sharing/base_v4 n no nat on bridge100 inet from 192.168.2.1 to 192.168.2.0/24
com.apple.internet-sharing/base_v4 n rdr on bridge100 inet proto tcp from 192.168.2.0/24 to any port = 21 -> 127.0.0.1 port 8021
usr.home r anchor "SSH" all
usr.home A usr.home/SSH
usr.home/SSH n rdr on en1 inet proto tcp from any to 10.0.0.36 port = 8080 -> 192.168.2.34 port 80