Pagina 1 di 2 1 2 ultimoultimo
Visualizzazione dei risultati da 1 a 10 su 11
  1. #1

    [FIREWALL] IPTables e RDP

    Ho la necessità di collegarmi a diversi server RDP per poterli gestire, con IP pubblico (ip differente dalla mia rete)

    su iptables ho impostato le regole generali di INPUT ed OUTPUT a DROP e poi nella catena ho inserito le seguneti

    codice:
    -A INPUT -p tcp --dport 3389 -j ACCEPT
    -A OUTPUT -p tcp --dport 3389 -j ACCEPT
    ma purtroppo non riesco a collegarmi con quei server Windows da remoto... dove sbaglio?

  2. #2
    Utente di HTML.it
    Registrato dal
    Sep 2006
    Messaggi
    796
    Spe`. Quelle regole le hai messe sul tuo client? Il server e` dietro a un router, immagino.. la 3389 vi e` gia` inoltrata? E tu su che tipo di rete sei?

  3. #3
    queste regole sono del firewall della rete del client (rete locale)

    Lato server funziona e le porte sono forwardate

  4. #4
    Utente di HTML.it
    Registrato dal
    Sep 2006
    Messaggi
    796
    Ok. Vedi un po':

    iptables -A FORWARD -i eth0 -s 192.168.0.0/24 -p tcp --dport 3389 -d ip_server -j ACCEPT

    Sostituisci 192.eccetera con l'indirizzo della rete lato lan, eth0 con la sua corrispondente interfaccia fisica e ip_server con l'indirizzo remoto del server rdp.

  5. #5
    nulla da fare

  6. #6
    Utente di HTML.it
    Registrato dal
    Sep 2006
    Messaggi
    796
    Hai possibilita` di accedere al fw direttamente (quindi niente ssh) e fare un momentaneo flush delle catene per verificare se riesci a telnettarti alla 3389 di un qualsiasi rdp server?

  7. #7
    provo e ti faccio sapere

  8. #8
    nulla

    quanto segue sono le regole di iptables

    codice:
    Chain INPUT (policy DROP)
    target     prot opt source               destination         
    ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:ftp 
    ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:ssh 
    ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:domain 
    ACCEPT     udp  --  anywhere             anywhere            udp dpt:domain 
    ACCEPT     udp  --  anywhere             anywhere            udp dpt:bootps 
    ACCEPT     udp  --  anywhere             anywhere            udp dpt:bootpc 
    ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:pop3 
    ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:https 
    ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:www 
    ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:pop3s 
    ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:ms-sql-s 
    ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:ms-sql-m 
    ACCEPT     udp  --  anywhere             anywhere            udp dpt:ms-sql-m 
    ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:3128 
    ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:mysql 
    ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:3389 
    ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:5800 
    ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:5900 
    
    Chain FORWARD (policy ACCEPT)
    target     prot opt source               destination         
    
    Chain OUTPUT (policy DROP)
    target     prot opt source               destination         
    ACCEPT     tcp  --  anywhere             anywhere            tcp spt:ssh 
    ACCEPT     tcp  --  anywhere             anywhere            tcp spt:www 
    ACCEPT     tcp  --  anywhere             anywhere            tcp spt:pop3 
    ACCEPT     tcp  --  anywhere             anywhere            tcp spt:ftp-data 
    ACCEPT     tcp  --  anywhere             anywhere            tcp spt:ftp 
    ACCEPT     tcp  --  anywhere             anywhere            tcp spt:https 
    ACCEPT     tcp  --  anywhere             anywhere            tcp spt:microsoft-ds 
    ACCEPT     udp  --  anywhere             anywhere            udp spt:microsoft-ds 
    ACCEPT     tcp  --  anywhere             anywhere            tcp spt:nntps 
    ACCEPT     tcp  --  anywhere             anywhere            tcp spt:pop3s 
    ACCEPT     tcp  --  anywhere             anywhere            tcp spt:ms-sql-s 
    ACCEPT     tcp  --  anywhere             anywhere            tcp spt:ms-sql-m 
    ACCEPT     udp  --  anywhere             anywhere            udp spt:ms-sql-m 
    ACCEPT     tcp  --  anywhere             anywhere            tcp spt:3128 
    ACCEPT     tcp  --  anywhere             anywhere            tcp spt:mysql 
    ACCEPT     tcp  --  anywhere             anywhere            tcp spt:3389 
    ACCEPT     tcp  --  anywhere             anywhere            tcp spt:5800 
    ACCEPT     tcp  --  anywhere             anywhere            tcp spt:5900

  9. #9
    Utente di HTML.it
    Registrato dal
    Sep 2006
    Messaggi
    796
    L'idea e` di ottenere questo nella catena forward:

    codice:
    ACCEPT     tcp  --  192.168.0.0/24            w.x.y.z            tcp dpt:3389
    Alle brutte puoi avere una roba di 'sto tipo:

    codice:
    ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:3389

  10. #10
    Problema risolto, nel firewall a monte (freeBSD) vi era la regola che bloccava ogni connessione alla 3389,...

    grazie comunque di tutto

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.