View previous topic :: View next topic |
Author |
Message |
Crema83 Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/848192784257f3c52e413.gif)
Joined: 06 Oct 2004 Posts: 207 Location: Settimo Milanese (MI)
|
Posted: Thu Feb 17, 2005 7:35 pm Post subject: Problema porta 22 con Firefox |
|
|
Ciao a tutti,
dovrei usare un'applicazione via Web che si appoggia alla porta 22 di un ServerWeb ma con FireFox mi è praticamente impossibile dato che di default questa porta viene utilizzata x le connessioni SSH se non sbaglio... Qualcuno sa dirmi se è possibile fare qualcosa o ci rinuncio subito???
Grazie mille... _________________ Cream
" We live as we dream : ALONE " |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
comio Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/761284344415a971047e47.gif)
Joined: 03 Jul 2003 Posts: 2191 Location: Taranto
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Crema83 Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/848192784257f3c52e413.gif)
Joined: 06 Oct 2004 Posts: 207 Location: Settimo Milanese (MI)
|
Posted: Thu Feb 17, 2005 8:44 pm Post subject: |
|
|
Sì... mi da problemi anche così!!! _________________ Cream
" We live as we dream : ALONE " |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
comio Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/761284344415a971047e47.gif)
Joined: 03 Jul 2003 Posts: 2191 Location: Taranto
|
Posted: Thu Feb 17, 2005 8:51 pm Post subject: |
|
|
qualche strano firewall?
che problemi dà?
Sicuro che sia http? _________________ RTFM!!!!
e
http://www.comio.it
![Smile :)](images/smiles/icon_smile.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Crema83 Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/848192784257f3c52e413.gif)
Joined: 06 Oct 2004 Posts: 207 Location: Settimo Milanese (MI)
|
Posted: Fri Feb 18, 2005 12:18 pm Post subject: |
|
|
comio wrote: | qualche strano firewall?
che problemi dà?
Sicuro che sia http? |
Sì sì ... è http... il problema dovrebbe essere che Unix in generale usa la porta 22 x le connessioni SSh quindi è già utilizzata di default... La mia domanda era se era possibile modificare in qualche modo questa impostazione "liberando" la porta... _________________ Cream
" We live as we dream : ALONE " |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Cazzantonio Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/195356323743686d76373d8.jpg)
Joined: 20 Mar 2004 Posts: 4514 Location: Somewere around the world
|
Posted: Fri Feb 18, 2005 12:24 pm Post subject: |
|
|
prova a stoppare il demone sshd in ascolto... tipo Code: | /etc/init.d/sshd stop |
P.S. non avrai mica qualche regola di iptables settata a rigurado? hai un firewall attivo? Sei dietro un router che agisce da firewall?
Certo che proprio sulla 22 dovevano mettere un servizio.... ![Confused :?](images/smiles/icon_confused.gif) _________________ Any mans death diminishes me, because I am involved in Mankinde; and therefore never send to know for whom the bell tolls; It tolls for thee.
-John Donne |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
kaosone Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/163872956741f57be986f19.jpg)
Joined: 01 Feb 2004 Posts: 446
|
Posted: Fri Feb 18, 2005 12:52 pm Post subject: |
|
|
mah non si e' capito molto bene onestamente
che c'entra la porta usata di default con firefox??
potresti essere un po piu' chiaro? ![Rolling Eyes :roll:](images/smiles/icon_rolleyes.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Deimus n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/188516479642567e5aa512c.png)
Joined: 11 Feb 2005 Posts: 2 Location: Solduno, Ticino (CH)
|
Posted: Fri Feb 18, 2005 12:55 pm Post subject: |
|
|
non puio modificare il suo servizio, fa parte delle porte diciamo standarizzate |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
xchris Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/212070142342d3867489e82.jpg)
Joined: 10 Jul 2003 Posts: 2824
|
Posted: Fri Feb 18, 2005 2:07 pm Post subject: |
|
|
fai una cosa...
telnet server 22
premi un po' di enter..
e pasta il risultato.
Stoppare la tua 22 non ha senso.
Se firefox non vuole saperne di parlare con la 22 di quel server i casi sono 2:
-non c'e' un servizio in ascolto
-non e' un serve web
in ogni caso firefox non c'entra nulla.
ciao _________________ while True:Gentoo() |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
AlterX l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/gallery/The Matrix/movie_the_matrix_neo_2.gif)
Joined: 03 Apr 2004 Posts: 754 Location: rm -rf /*
|
Posted: Fri Feb 18, 2005 2:26 pm Post subject: |
|
|
Le porte fino a 1024 sono riservate...
sono gli altri che devono adattarsi a questa condizione, non il contrario!
![Wink :wink:](images/smiles/icon_wink.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Crema83 Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/848192784257f3c52e413.gif)
Joined: 06 Oct 2004 Posts: 207 Location: Settimo Milanese (MI)
|
Posted: Fri Feb 18, 2005 3:27 pm Post subject: |
|
|
@AlterX
Quote: | Le porte fino a 1024 sono riservate...
sono gli altri che devono adattarsi a questa condizione, non il contrario! |
Lo so... è proprio questo il problema...
@Cazzantonio
Niente firewall... ed inoltre il demone sshd non è attivo...
Quote: | Certo che proprio sulla 22 dovevano mettere un servizio... |
E' quello che ho detto anche io... il fatto è che da IE funziona tutto... solo che non ho per niente voglia lanciare Win ogni volta.... ![Crying or Very sad :cry:](images/smiles/icon_cry.gif) _________________ Cream
" We live as we dream : ALONE " |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
gutter Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/67030318436dd16c1dd5e.jpg)
Joined: 13 Mar 2004 Posts: 7162 Location: Aarau, Aargau, Switzerland
|
Posted: Fri Feb 18, 2005 3:46 pm Post subject: |
|
|
Hai provato a fare quello che ti ha detto xchris? _________________ Registered as User #281564 and Machines #163761 |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
kaosone Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/163872956741f57be986f19.jpg)
Joined: 01 Feb 2004 Posts: 446
|
Posted: Fri Feb 18, 2005 9:47 pm Post subject: |
|
|
forse ho capito quello che intendi
prova con datapipe
datapipe 127.0.0.1 80 hostremoto 22
e poi ti colleghi con firefox a http://127.0.0.1/ |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Crema83 Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/848192784257f3c52e413.gif)
Joined: 06 Oct 2004 Posts: 207 Location: Settimo Milanese (MI)
|
Posted: Fri Feb 18, 2005 10:11 pm Post subject: |
|
|
kaosone wrote: | forse ho capito quello che intendi
prova con datapipe
datapipe 127.0.0.1 80 hostremoto 22
e poi ti colleghi con firefox a http://127.0.0.1/ |
Mi ero illuso che funzionasse ma ...
Code: | root@CreamBox me # connect: Invalid argument
connect: Invalid argument |
_________________ Cream
" We live as we dream : ALONE " |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
kaosone Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/163872956741f57be986f19.jpg)
Joined: 01 Feb 2004 Posts: 446
|
Posted: Fri Feb 18, 2005 10:29 pm Post subject: |
|
|
e' il datapipe che installa gentoo che sembra buggato
ho provato con questo e va
Code: |
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/wait.h>
#include <netinet/in.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <unistd.h>
#include <netdb.h>
#include <linux/time.h>
#ifdef STRERROR
extern char *sys_errlist[];
extern int sys_nerr;
char *undef = "Undefined error";
char *strerror(error)
int error;
{
if (error > sys_nerr)
return undef;
return sys_errlist[error];
}
#endif
main(argc, argv)
int argc;
char **argv;
{
int lsock, csock, osock;
FILE *cfile;
char buf[4096];
struct sockaddr_in laddr, caddr, oaddr;
int caddrlen = sizeof(caddr);
fd_set fdsr, fdse;
struct hostent *h;
struct servent *s;
int nbyt;
unsigned long a;
unsigned short oport;
if (argc != 4) {
fprintf(stderr,"Usage: %s localport remoteport remotehost\n",argv[0]);
return 30;
}
a = inet_addr(argv[3]);
if (!(h = gethostbyname(argv[3])) &&
!(h = gethostbyaddr(&a, 4, AF_INET))) {
perror(argv[3]);
return 25;
}
oport = atol(argv[2]);
laddr.sin_port = htons((unsigned short)(atol(argv[1])));
if ((lsock = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP)) == -1) {
perror("socket");
return 20;
}
laddr.sin_family = htons(AF_INET);
laddr.sin_addr.s_addr = htonl(0);
if (bind(lsock, &laddr, sizeof(laddr))) {
perror("bind");
return 20;
}
if (listen(lsock, 1)) {
perror("listen");
return 20;
}
if ((nbyt = fork()) == -1) {
perror("fork");
return 20;
}
if (nbyt > 0)
return 0;
setsid();
while ((csock = accept(lsock, &caddr, &caddrlen)) != -1) {
cfile = fdopen(csock,"r+");
if ((nbyt = fork()) == -1) {
fprintf(cfile, "500 fork: %s\n", strerror(errno));
shutdown(csock,2);
fclose(cfile);
continue;
}
if (nbyt == 0)
goto gotsock;
fclose(cfile);
while (waitpid(-1, NULL, WNOHANG) > 0);
}
return 20;
gotsock:
if ((osock = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP)) == -1) {
fprintf(cfile, "500 socket: %s\n", strerror(errno));
goto quit1;
}
oaddr.sin_family = h->h_addrtype;
oaddr.sin_port = htons(oport);
memcpy(&oaddr.sin_addr, h->h_addr, h->h_length);
if (connect(osock, &oaddr, sizeof(oaddr))) {
fprintf(cfile, "500 connect: %s\n", strerror(errno));
goto quit1;
}
while (1) {
FD_ZERO(&fdsr);
FD_ZERO(&fdse);
FD_SET(csock,&fdsr);
FD_SET(csock,&fdse);
FD_SET(osock,&fdsr);
FD_SET(osock,&fdse);
if (select(20, &fdsr, NULL, &fdse, NULL) == -1) {
fprintf(cfile, "500 select: %s\n", strerror(errno));
goto quit2;
}
if (FD_ISSET(csock,&fdsr) || FD_ISSET(csock,&fdse)) {
if ((nbyt = read(csock,buf,4096)) <= 0)
goto quit2;
if ((write(osock,buf,nbyt)) <= 0)
goto quit2;
} else if (FD_ISSET(osock,&fdsr) || FD_ISSET(osock,&fdse)) {
if ((nbyt = read(osock,buf,4096)) <= 0)
goto quit2;
if ((write(csock,buf,nbyt)) <= 0)
goto quit2;
}
}
quit2:
shutdown(osock,2);
close(osock);
quit1:
fflush(cfile);
shutdown(csock,2);
quit0:
fclose(cfile);
return 0;
}
|
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Crema83 Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/848192784257f3c52e413.gif)
Joined: 06 Oct 2004 Posts: 207 Location: Settimo Milanese (MI)
|
Posted: Fri Feb 18, 2005 10:42 pm Post subject: |
|
|
kaosone wrote: | e' il datapipe che installa gentoo che sembra buggato
ho provato con questo e va
|
Sorry ma ... cosa dovrei fare??? ![Confused :?](images/smiles/icon_confused.gif) _________________ Cream
" We live as we dream : ALONE " |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
kaosone Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/163872956741f57be986f19.jpg)
Joined: 01 Feb 2004 Posts: 446
|
Posted: Fri Feb 18, 2005 10:46 pm Post subject: |
|
|
crei un file datapipe.c e ci metti dentro tutto quel codice
compili con Code: | gcc -o datapipe datapipe.c |
./datapipe 80 22 remotehost
ciao |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Crema83 Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/848192784257f3c52e413.gif)
Joined: 06 Oct 2004 Posts: 207 Location: Settimo Milanese (MI)
|
Posted: Fri Feb 18, 2005 11:12 pm Post subject: |
|
|
kaosone wrote: | crei un file datapipe.c e ci metti dentro tutto quel codice
compili con Code: | gcc -o datapipe datapipe.c |
./datapipe 80 22 remotehost
ciao |
Nada... mi restituisce il seguente errore in compilazione:
Code: | In file included from datapipe.c:11:
/usr/include/linux/time.h:9: error: redefinition of `struct timespec'
/usr/include/linux/time.h:88: error: redefinition of `struct timeval'
datapipe.c: In function `main':
datapipe.c:61: warning: passing arg 2 of `bind' from incompatible pointer type
datapipe.c:76: warning: passing arg 2 of `accept' from incompatible pointer type
datapipe.c:99: warning: passing arg 2 of `connect' from incompatible pointer type
|
_________________ Cream
" We live as we dream : ALONE " |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
kaosone Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/163872956741f57be986f19.jpg)
Joined: 01 Feb 2004 Posts: 446
|
Posted: Fri Feb 18, 2005 11:17 pm Post subject: |
|
|
se ti fidio ti ho compilato due versioni, statica e non statica
Code: |
wget fedekaos.interfree.it/datapipe1
wget fedekaos.interfree.it/datapipe2
chmod +x datapipe*
./datapipe1 80 22 rhost
#se non funziona
./datapipe2 80 22 rhost
|
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Crema83 Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/848192784257f3c52e413.gif)
Joined: 06 Oct 2004 Posts: 207 Location: Settimo Milanese (MI)
|
Posted: Fri Feb 18, 2005 11:28 pm Post subject: |
|
|
kaosone wrote: | se ti fidio ti ho compilato due versioni, statica e non statica
Code: |
wget fedekaos.interfree.it/datapipe1
wget fedekaos.interfree.it/datapipe2
chmod +x datapipe*
./datapipe1 80 22 rhost
#se non funziona
./datapipe2 80 22 rhost
|
|
Niente...continua a dirmi che non è possibile accedere anche se il settaggio è andato a buon fine...
Ci rinuncio...emulerò con Wine... _________________ Cream
" We live as we dream : ALONE " |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
kaosone Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/163872956741f57be986f19.jpg)
Joined: 01 Feb 2004 Posts: 446
|
Posted: Fri Feb 18, 2005 11:30 pm Post subject: |
|
|
allora imho c'e' qualche problema lato server.. non puoi dirci l'indirizzo? ![Question :?:](images/smiles/icon_question.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Crema83 Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/848192784257f3c52e413.gif)
Joined: 06 Oct 2004 Posts: 207 Location: Settimo Milanese (MI)
|
Posted: Fri Feb 18, 2005 11:39 pm Post subject: |
|
|
kaosone wrote: | allora imho c'e' qualche problema lato server.. non puoi dirci l'indirizzo? ![Question :?:](images/smiles/icon_question.gif) |
Mmm... adesso mi viene in mente una cos... Il problema potrebbe essere dovuto al fatto che serve l'autenticazione x accedere a quella pagina??? _________________ Cream
" We live as we dream : ALONE " |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
kaosone Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/163872956741f57be986f19.jpg)
Joined: 01 Feb 2004 Posts: 446
|
Posted: Fri Feb 18, 2005 11:46 pm Post subject: |
|
|
non dovrebbe.. prova ad usare datapipe con a es. www.google.it e vedi se va o no |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|