Ich hab nen Linux-Router aufgesetzt und mit hilfe von IP-Tables 2 Ports in das Interne Netz weitergeleitet:
Code: Alles auswählen
eth0: Internet [Feste IP]
eth1, eth2: Lokales Netz, eth1 ist das 10er, darum gehts
Code: Alles auswählen
80 \_ 123.45.67.89 => 192.168.10.88 _/ 8080
22000 / \ 22
Code: Alles auswählen
*filter
:INPUT ACCEPT [498:69543]
:FORWARD ACCEPT [8426:2551129]
:OUTPUT ACCEPT [302:18203]
-A INPUT -p tcp -m tcp --dport 25 -j DROP
-A INPUT -i eth0 -p tcp -m tcp --dport 3128 -j DROP
-A FORWARD -s 192.168.10.88 -i eth1 -o eth0 -p tcp -m tcp --dport 80 -j ACCEPT
-A FORWARD -s 192.168.10.88 -i eth1 -o eth0 -p tcp -m tcp --dport 22000 -j ACCEPT
COMMIT
*mangle
:PREROUTING ACCEPT [8991:2624455]
:INPUT ACCEPT [498:69543]
:FORWARD ACCEPT [8458:2553792]
:OUTPUT ACCEPT [303:18371]
:POSTROUTING ACCEPT [8761:2572163]
COMMIT
*nat
:PREROUTING ACCEPT [468:42392]
:POSTROUTING ACCEPT [277:13476]
:OUTPUT ACCEPT [7:483]
-A PREROUTING -d 123.45.67.89 -i eth0 -p tcp -m tcp --dport 80 -j DNAT --to-destination 192.168.10.88:8080
-A PREROUTING -d 123.45.67.89 -i eth0 -p tcp -m tcp --dport 22000 -j DNAT --to-destination 192.168.10.88:22
-A POSTROUTING -o eth0 -j MASQUERADE
COMMIT
Code: Alles auswählen
nmap 123.45.67.89 -p 1-65535
Interesting ports on my-router.router.local (123.45.67.89):
(The 65533 ports scanned but not shown below are in state: closed)
Port State Service
25/tcp filtered smtp
3128/tcp open squid-http
Nmap run completed -- 1 IP address (1 host up) scanned in 12 seconds
Code: Alles auswählen
gheift-server:~# nmap 123.45.67.89 -p 25,80,3128,22000
Starting nmap V. 2.54BETA31 ( www.insecure.org/nmap/ )
Interesting ports on (123.45.67.89):
Port State Service
25/tcp filtered smtp
80/tcp open http
3128/tcp filtered squid-http
22000/tcp open unknown
Nmap run completed -- 1 IP address (1 host up) scanned in 4 seconds