|
|
|
![]() |
|
Strumenti |
![]() |
#1 |
Senior Member
Iscritto dal: Mar 2004
Messaggi: 581
|
Firewall blocca Vnc! Aiuto Iptables
ragazzi ho un grave problemino sto lavorando da remoto su un server ssh e tramite putty riesco ad entrare tranquillamente lavorando da shell ora pero devo provare il server che ho installato e devo entrare con vnc solo che ci sta il firewall che mi blocca la connessione, il mio prof mi ha detto che devo modificare l'iptables aggiungendo delle stringhe che cos'è? Dove posso trovare qlc in riguardo?
Qlc di voi sa come fare per sbloccare vnc?? Vi ringrazio ciao
__________________
Toshiba M40-281 |
![]() |
![]() |
![]() |
#2 |
Senior Member
Iscritto dal: Mar 2004
Messaggi: 581
|
![]()
__________________
Toshiba M40-281 |
![]() |
![]() |
![]() |
#3 |
Senior Member
Iscritto dal: Dec 2000
Città: Trento
Messaggi: 5917
|
se funziona ssh, non aprire altre porte del firewall (di al tuo prof di andare a studiare!) ma fatti un bel tunnel con ssh (si fa anche con putty)
Nella mia signature c'e' un bel howto per ssh (compreso di tunnel!) Ciao
__________________
Linux User #272700 >+++++++++[<+++++++++>-]<+.++.>++++[<---->-]<++.+++++++. HOWTO: SSH Firewall e DMZ ɐɹdosoʇʇos oʇuǝs ıɯ |
![]() |
![]() |
![]() |
#4 |
Senior Member
Iscritto dal: Mar 2004
Messaggi: 581
|
il problema è che lui vuole che mi studio il comando iptables, cosa che sto facendo sul manuale della red hat http://www.europe.redhat.com/documen...-iptables.php3 (se hai qualche altro link te ne sono grato) ma cmq ho paura di andare a fare le prove perchè potrei peggiorare ulteriormente le cose visto che dispongo anche della password di root. Tu sai cosa devo aggiungere a iptables per aprire vnc e loggarmi da remoto??
Grazie
__________________
Toshiba M40-281 |
![]() |
![]() |
![]() |
#5 |
Senior Member
Iscritto dal: Oct 2005
Città: Genova
Messaggi: 937
|
Per quanto riguarda la documentazione di iptables ti suggerisco di guardare l'home page www.netfilter.org dove puoi trovare ottimi howto (io ho cominciato cosi')
http://www.netfilter.org/documentati...entation-howto Ciao, Mr Hyde
__________________
MacMini Late 2009/MacMini 2018 |
![]() |
![]() |
![]() |
#6 |
Senior Member
Iscritto dal: Mar 2004
Messaggi: 581
|
va bene se come regola a iptables metto:
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 5903 -j ACCEPT dove 5903 è la porta di vnc??
__________________
Toshiba M40-281 |
![]() |
![]() |
![]() |
#7 |
Senior Member
Iscritto dal: Mar 2004
Messaggi: 581
|
a proposito di porta vnc se uso il comando ps -ax|grep vnc mi restituisce questo risultato: 19561 pts/0 S 0:00 grep vnc. come faccio a vedere su che porta si trova vnc?
![]()
__________________
Toshiba M40-281 |
![]() |
![]() |
![]() |
#8 |
Senior Member
Iscritto dal: Aug 1999
Messaggi: 470
|
Di solito la porta è la 5900... comunque sia controlla con il comando
netstat -plan
__________________
By [Gnomix] WM www.gnomixland.com Project Manager Founder di http://iptablesweb.sourceforge.net/ |
![]() |
![]() |
![]() |
#9 |
Senior Member
Iscritto dal: Mar 2004
Messaggi: 581
|
ok perfetto ci sono riuscito rifacendo partire vncserver si era misteriosamente bloccato, ma ho un problema che non riesco a capire ora io ho installato tomcat che devo far partire un application server solo che una volta lanciato tramite shell vado da remoto e apro il browser del server e quando provo a connettermi a localhost:8080 che è la porta di tomcat mi dice che: The connection was refused when attempiting to localhost:8080.
Come mai mi succede questo visto che sto lavorando da locale?? Grazie per le risposte
__________________
Toshiba M40-281 |
![]() |
![]() |
![]() |
#10 |
Senior Member
Iscritto dal: Nov 2005
Messaggi: 1868
|
Bhe, i casi son 2:
- o non c'è tomcat in ascolto sulla 8080 (netstat che dice?) - o iptables non ti fa passare (che regole ha l'interfaccia lo?) comunque, nella regola che hai scritto prima il "-m tcp" è inutile.
__________________
[ W.S. ] |
![]() |
![]() |
![]() |
#11 | |
Senior Member
Iscritto dal: Mar 2004
Messaggi: 581
|
Quote:
Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:32768 0.0.0.0:* LISTEN 1213/rpc.statd tcp 0 0 127.0.0.1:32769 0.0.0.0:* LISTEN 1366/xinetd tcp 0 0 0.0.0.0:5801 0.0.0.0:* LISTEN 19878/Xvnc tcp 0 0 0.0.0.0:5803 0.0.0.0:* LISTEN 19743/Xvnc tcp 0 0 0.0.0.0:5901 0.0.0.0:* LISTEN 19878/Xvnc tcp 0 0 0.0.0.0:5903 0.0.0.0:* LISTEN 19743/Xvnc tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1194/portmap tcp 0 0 0.0.0.0:6001 0.0.0.0:* LISTEN 19878/Xvnc tcp 0 0 0.0.0.0:6003 0.0.0.0:* LISTEN 19743/Xvnc tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1352/sshd tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 6410/cupsd tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1392/sendmail: acce tcp 0 100 143.225.25.104:22 87.3.148.101:2935 ESTABLISHED 20116/sshd: scotti udp 0 0 0.0.0.0:32768 0.0.0.0:* 1213/rpc.statd udp 0 0 0.0.0.0:965 0.0.0.0:* 1213/rpc.statd udp 0 0 0.0.0.0:111 0.0.0.0:* 1194/portmap udp 0 0 0.0.0.0:631 0.0.0.0:* 6410/cupsd Active UNIX domain sockets (servers and established) Proto RefCnt Flags Type State I-Node PID/Program name Path unix 2 [ ACC ] STREAM LISTENING 47849 19950/gconfd-2 /tmp/orbit-scotti/linc-4dee-0-718f151763de1 unix 2 [ ACC ] STREAM LISTENING 47857 19948/gnome-panel /tmp/orbit-scotti/linc-4dec-0-c0485f80cf5 unix 2 [ ACC ] STREAM LISTENING 47899 19952/bonobo-activa /tmp/orbit-scotti/linc-4df0-0-2428b5facb152 unix 2 [ ACC ] STREAM LISTENING 47970 19955/notification- /tmp/orbit-scotti/linc-4df3-0-78312cbb863c1 unix 2 [ ACC ] STREAM LISTENING 47910 19953/fam /tmp/.fam_socket unix 2 [ ACC ] STREAM LISTENING 1990 1452/xfs /tmp/.font-unix/fs7100 unix 2 [ ACC ] STREAM LISTENING 47769 19878/Xvnc /tmp/.X11-unix/X1 unix 2 [ ACC ] STREAM LISTENING 46952 19743/Xvnc /tmp/.X11-unix/X3 unix 2 [ ACC ] STREAM LISTENING 1939 1411/gpm /dev/gpmctl unix 10 [ ] DGRAM 1415 1163/syslogd /dev/log unix 3 [ ] STREAM CONNECTED 49753 20116/sshd: scotti unix 3 [ ] STREAM CONNECTED 49752 20118/0 unix 3 [ ] STREAM CONNECTED 49700 19878/Xvnc /tmp/.X11-unix/X1 unix 3 [ ] STREAM CONNECTED 49699 20096/mozilla-bin unix 3 [ ] STREAM CONNECTED 47986 19948/gnome-panel /tmp/orbit-scotti/linc-4dec-0-c0485f80cf5 unix 3 [ ] STREAM CONNECTED 47985 19955/notification- unix 3 [ ] STREAM CONNECTED 47984 19955/notification- /tmp/orbit-scotti/linc-4df3-0-78312cbb863c1 unix 3 [ ] STREAM CONNECTED 47983 19948/gnome-panel unix 3 [ ] STREAM CONNECTED 47978 19955/notification- /tmp/orbit-scotti/linc-4df3-0-78312cbb863c1 unix 3 [ ] STREAM CONNECTED 47977 19952/bonobo-activa unix 3 [ ] STREAM CONNECTED 47976 19952/bonobo-activa /tmp/orbit-scotti/linc-4df0-0-2428b5facb152 unix 3 [ ] STREAM CONNECTED 47975 19955/notification- unix 3 [ ] STREAM CONNECTED 47973 19955/notification- /tmp/orbit-scotti/linc-4df3-0-78312cbb863c1 unix 3 [ ] STREAM CONNECTED 47972 19950/gconfd-2 unix 3 [ ] STREAM CONNECTED 47969 19950/gconfd-2 /tmp/orbit-scotti/linc-4dee-0-718f151763de1 unix 3 [ ] STREAM CONNECTED 47968 19955/notification- unix 3 [ ] STREAM CONNECTED 47962 19878/Xvnc /tmp/.X11-unix/X1 unix 3 [ ] STREAM CONNECTED 47961 19955/notification- unix 3 [ ] STREAM CONNECTED 47916 19953/fam /tmp/.famdhsTLb unix 3 [ ] STREAM CONNECTED 47915 19948/gnome-panel unix 3 [ ] STREAM CONNECTED 47905 19948/gnome-panel /tmp/orbit-scotti/linc-4dec-0-c0485f80cf5 unix 3 [ ] STREAM CONNECTED 47904 19952/bonobo-activa unix 3 [ ] STREAM CONNECTED 47903 19952/bonobo-activa /tmp/orbit-scotti/linc-4df0-0-2428b5facb152 unix 3 [ ] STREAM CONNECTED 47902 19948/gnome-panel unix 3 [ ] STREAM CONNECTED 47893 19948/gnome-panel /tmp/orbit-scotti/linc-4dec-0-c0485f80cf5 unix 3 [ ] STREAM CONNECTED 47892 19950/gconfd-2 unix 3 [ ] STREAM CONNECTED 47891 19950/gconfd-2 /tmp/orbit-scotti/linc-4dee-0-718f151763de1 unix 3 [ ] STREAM CONNECTED 47856 19948/gnome-panel unix 2 [ ] DGRAM 47848 19950/gconfd-2 unix 3 [ ] STREAM CONNECTED 47838 19878/Xvnc /tmp/.X11-unix/X1 unix 3 [ ] STREAM CONNECTED 47837 19948/gnome-panel unix 3 [ ] STREAM CONNECTED 47782 19878/Xvnc /tmp/.X11-unix/X1 unix 3 [ ] STREAM CONNECTED 47781 19884/xterm unix 3 [ ] STREAM CONNECTED 47780 19878/Xvnc /tmp/.X11-unix/X1 unix 3 [ ] STREAM CONNECTED 47779 19885/twm unix 3 [ ] STREAM CONNECTED 47778 19878/Xvnc /tmp/.X11-unix/X1 unix 3 [ ] STREAM CONNECTED 47777 19883/vncconfig unix 3 [ ] STREAM CONNECTED 46968 19743/Xvnc /tmp/.X11-unix/X3 unix 3 [ ] STREAM CONNECTED 46967 19752/xterm unix 3 [ ] STREAM CONNECTED 46966 19743/Xvnc /tmp/.X11-unix/X3 unix 3 [ ] STREAM CONNECTED 46965 19753/twm unix 3 [ ] STREAM CONNECTED 46964 19743/Xvnc /tmp/.X11-unix/X3 unix 3 [ ] STREAM CONNECTED 46963 19751/vncconfig unix 2 [ ] DGRAM 2023 1452/xfs unix 2 [ ] DGRAM 1957 1420/crond unix 2 [ ] DGRAM 1922 1401/clientmqueue unix 2 [ ] DGRAM 1908 1392/sendmail: acce unix 2 [ ] DGRAM 1777 1366/xinetd unix 2 [ ] DGRAM 1491 1213/rpc.statd unix 2 [ ] DGRAM 1423 1167/klogd Se non è in ascolto su localhost mi dite come fare a metterlo in ascolto?? Grazie
__________________
Toshiba M40-281 |
|
![]() |
![]() |
![]() |
#12 | |
Senior Member
Iscritto dal: Nov 2005
Messaggi: 1868
|
Non è in ascolto, ne su localhost ne da altre parti, sicuro che tomcat sia attivo? ps che dice?
Quando avvii tomcat non da nessun messaggio di errore? Nel file di configurazione hai toccato qualcosa? (Non so dove ne come sia fatto questo file, uso apache) Per vedere se è in ascolto ti bastano le righe come queste: Quote:
![]()
__________________
[ W.S. ] |
|
![]() |
![]() |
![]() |
#13 |
Senior Member
Iscritto dal: Mar 2004
Messaggi: 581
|
hai ragione avevo fatto io un casino con le variabili d'ambiente e non partiva una mazza
![]() Uso il tag NameVirtualHost www.openca.it:80 <VirtualHost www.openca.it:80> ServerAdmin erm...@gmail.com DocumentRoot /home/..../apache/htdocs ServerName www.openca.it <Directory /home/.../apache/htdocs> Options Indexes FollowSymlinks MultiViews AllowOverride None Order allow,deny Allow from all </Directory> ScriptAlias /cgi-bin/ /home/..../cgi-bin/ <Directory /home/..../apache/cgi-bin> AllowOverride None Options None Order allow,deny Allow from all </Directory> # ErrorLog logs/dummy-host.example.com-error_log # CustomLog logs/dummy-host.example.com-access_log common </VirtualHost> solo che quando attivo mi dice canot resolve host... come devo fare a usare un Name virtualhost?? che non ci sono riuscito Grazie x l'aiuto
__________________
Toshiba M40-281 |
![]() |
![]() |
![]() |
#14 |
Senior Member
Iscritto dal: Nov 2005
Messaggi: 1868
|
In /etc/hosts hai openca.it e openra.it? Se non li hai devi metterceli, in poche parole, devi fare in modo che quegli indirizzi siano risolvibili quindi se non hai a disposizione il server DNS che usa il tuo pc, mettili in /etc/hosts (non son sicurissimo sul nome del file, ora son su una macchina win purtroppo) Appena ce la faccio ti mando un pezzo di httpd.conf funzionante.
__________________
[ W.S. ] |
![]() |
![]() |
![]() |
#15 | |
Senior Member
Iscritto dal: Mar 2004
Messaggi: 581
|
Quote:
__________________
Toshiba M40-281 |
|
![]() |
![]() |
![]() |
#16 |
Senior Member
Iscritto dal: Mar 2004
Messaggi: 581
|
allora ho dovuto rifare un 'installazionedacapo per installare apache server 2.2 solo che senza modificare il file httpd.conf quando accedo anche in locale mi dice
Forbidden You don't have permission to access / on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. come devo fare a risolvere questo bel problemino??
__________________
Toshiba M40-281 |
![]() |
![]() |
![]() |
Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 01:23.