|
|
|
![]() |
|
Strumenti |
![]() |
#1 |
Senior Member
Iscritto dal: Jul 2002
Città: Padova
Messaggi: 4245
|
Regola iptables.........
Ho bisogno di un chiarimento.
Ho necessità di dirottare il traffico derivante dalla connessione internet sulla porta 5601 verso un pc interno con IP 192.168.0.99. Credo di aver fatto tutto il necessario, però i pacchetti non vengono deviati verso l'IP richiesto ![]() Codice:
Chain INPUT (policy DROP) target prot opt source destination ACCEPT all -- 192.168.0.0/24 anywhere ACCEPT all -- localhost anywhere ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED ACCEPT tcp -- anywhere anywhere tcp dpt:ssh ACCEPT tcp -- anywhere 192.168.0.99 tcp dpt:5601 LOG all -- anywhere anywhere LOG level debug prefix `Firewall: ' Chain FORWARD (policy DROP) target prot opt source destination ACCEPT tcp -- anywhere 192.168.0.99 tcp dpt:5601 ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED ACCEPT all -- 192.168.0.0/24 anywhere Chain OUTPUT (policy DROP) target prot opt source destination ACCEPT all -- anywhere 192.168.0.0/24 ACCEPT all -- anywhere localhost ACCEPT all -- anywhere anywhere state NEW,RELATED,ESTABLISHED ![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
Iscritto dal: Mar 2005
Città: Ravenna
Messaggi: 1937
|
Devi usare il DNAT (Destination Nat) in questo modo
iptables -t nat -A PREROUTING -p tcp --dport 5601 -j DNAT --to-destination 192.168.0.99:5601 O almeno questo ho capito cercando in rete.
__________________
Dell Inspiron 1720 Ice White Windows 7 Pro/Archlinux x86_64 - 3.0.x -Gnome3 Msi Wind U100 Windows Xp/Ubuntu 11.04 - Gnome3 |
![]() |
![]() |
![]() |
#3 | |
Senior Member
Iscritto dal: Jul 2002
Città: Padova
Messaggi: 4245
|
Quote:
Effettivamente avevo già messo questa regola, solo che sbadatamente avevo scritto -p udp e non tcp. Trovato l'inghippo ![]() Grazie. |
|
![]() |
![]() |
![]() |
#4 |
Senior Member
Iscritto dal: Mar 2005
Città: Ravenna
Messaggi: 1937
|
Ottimo ^^
__________________
Dell Inspiron 1720 Ice White Windows 7 Pro/Archlinux x86_64 - 3.0.x -Gnome3 Msi Wind U100 Windows Xp/Ubuntu 11.04 - Gnome3 |
![]() |
![]() |
![]() |
Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 22:42.