Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Problema porta 22 con Firefox
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian)
View previous topic :: View next topic  
Author Message
Crema83
Apprentice
Apprentice


Joined: 06 Oct 2004
Posts: 207
Location: Settimo Milanese (MI)

PostPosted: Thu Feb 17, 2005 7:35 pm    Post subject: Problema porta 22 con Firefox Reply with quote

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
View user's profile Send private message
comio
Advocate
Advocate


Joined: 03 Jul 2003
Posts: 2191
Location: Taranto

PostPosted: Thu Feb 17, 2005 7:37 pm    Post subject: Reply with quote

Provato così?

http://pippo:22/

ciao
_________________
RTFM!!!!

e

http://www.comio.it
:)
Back to top
View user's profile Send private message
Crema83
Apprentice
Apprentice


Joined: 06 Oct 2004
Posts: 207
Location: Settimo Milanese (MI)

PostPosted: Thu Feb 17, 2005 8:44 pm    Post subject: Reply with quote

comio wrote:
Provato così?

http://pippo:22/

ciao


Sì... mi da problemi anche così!!!
_________________
Cream

" We live as we dream : ALONE "
Back to top
View user's profile Send private message
comio
Advocate
Advocate


Joined: 03 Jul 2003
Posts: 2191
Location: Taranto

PostPosted: Thu Feb 17, 2005 8:51 pm    Post subject: Reply with quote

qualche strano firewall?
che problemi dà?
Sicuro che sia http?
_________________
RTFM!!!!

e

http://www.comio.it
:)
Back to top
View user's profile Send private message
Crema83
Apprentice
Apprentice


Joined: 06 Oct 2004
Posts: 207
Location: Settimo Milanese (MI)

PostPosted: Fri Feb 18, 2005 12:18 pm    Post subject: Reply with quote

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
View user's profile Send private message
Cazzantonio
Bodhisattva
Bodhisattva


Joined: 20 Mar 2004
Posts: 4514
Location: Somewere around the world

PostPosted: Fri Feb 18, 2005 12:24 pm    Post subject: Reply with quote

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.... :?
_________________
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
View user's profile Send private message
kaosone
Guru
Guru


Joined: 01 Feb 2004
Posts: 446

PostPosted: Fri Feb 18, 2005 12:52 pm    Post subject: Reply with quote

mah non si e' capito molto bene onestamente
che c'entra la porta usata di default con firefox??
potresti essere un po piu' chiaro? :roll:
Back to top
View user's profile Send private message
Deimus
n00b
n00b


Joined: 11 Feb 2005
Posts: 2
Location: Solduno, Ticino (CH)

PostPosted: Fri Feb 18, 2005 12:55 pm    Post subject: Reply with quote

non puio modificare il suo servizio, fa parte delle porte diciamo standarizzate
Back to top
View user's profile Send private message
xchris
Advocate
Advocate


Joined: 10 Jul 2003
Posts: 2824

PostPosted: Fri Feb 18, 2005 2:07 pm    Post subject: Reply with quote

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
View user's profile Send private message
AlterX
l33t
l33t


Joined: 03 Apr 2004
Posts: 754
Location: rm -rf /*

PostPosted: Fri Feb 18, 2005 2:26 pm    Post subject: Reply with quote

Le porte fino a 1024 sono riservate...
sono gli altri che devono adattarsi a questa condizione, non il contrario! :twisted:
:wink:
Back to top
View user's profile Send private message
Crema83
Apprentice
Apprentice


Joined: 06 Oct 2004
Posts: 207
Location: Settimo Milanese (MI)

PostPosted: Fri Feb 18, 2005 3:27 pm    Post subject: Reply with quote

@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.... :cry:
_________________
Cream

" We live as we dream : ALONE "
Back to top
View user's profile Send private message
gutter
Bodhisattva
Bodhisattva


Joined: 13 Mar 2004
Posts: 7162
Location: Aarau, Aargau, Switzerland

PostPosted: Fri Feb 18, 2005 3:46 pm    Post subject: Reply with quote

Hai provato a fare quello che ti ha detto xchris?
_________________
Registered as User #281564 and Machines #163761
Back to top
View user's profile Send private message
kaosone
Guru
Guru


Joined: 01 Feb 2004
Posts: 446

PostPosted: Fri Feb 18, 2005 9:47 pm    Post subject: Reply with quote

forse ho capito quello che intendi :roll:
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
View user's profile Send private message
Crema83
Apprentice
Apprentice


Joined: 06 Oct 2004
Posts: 207
Location: Settimo Milanese (MI)

PostPosted: Fri Feb 18, 2005 10:11 pm    Post subject: Reply with quote

kaosone wrote:
forse ho capito quello che intendi :roll:
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
View user's profile Send private message
kaosone
Guru
Guru


Joined: 01 Feb 2004
Posts: 446

PostPosted: Fri Feb 18, 2005 10:29 pm    Post subject: Reply with quote

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
View user's profile Send private message
Crema83
Apprentice
Apprentice


Joined: 06 Oct 2004
Posts: 207
Location: Settimo Milanese (MI)

PostPosted: Fri Feb 18, 2005 10:42 pm    Post subject: Reply with quote

kaosone wrote:
e' il datapipe che installa gentoo che sembra buggato
ho provato con questo e va


Sorry ma ... cosa dovrei fare??? :?
_________________
Cream

" We live as we dream : ALONE "
Back to top
View user's profile Send private message
kaosone
Guru
Guru


Joined: 01 Feb 2004
Posts: 446

PostPosted: Fri Feb 18, 2005 10:46 pm    Post subject: Reply with quote

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
View user's profile Send private message
Crema83
Apprentice
Apprentice


Joined: 06 Oct 2004
Posts: 207
Location: Settimo Milanese (MI)

PostPosted: Fri Feb 18, 2005 11:12 pm    Post subject: Reply with quote

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
View user's profile Send private message
kaosone
Guru
Guru


Joined: 01 Feb 2004
Posts: 446

PostPosted: Fri Feb 18, 2005 11:17 pm    Post subject: Reply with quote

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
View user's profile Send private message
Crema83
Apprentice
Apprentice


Joined: 06 Oct 2004
Posts: 207
Location: Settimo Milanese (MI)

PostPosted: Fri Feb 18, 2005 11:28 pm    Post subject: Reply with quote

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
View user's profile Send private message
kaosone
Guru
Guru


Joined: 01 Feb 2004
Posts: 446

PostPosted: Fri Feb 18, 2005 11:30 pm    Post subject: Reply with quote

allora imho c'e' qualche problema lato server.. non puoi dirci l'indirizzo? :?:
Back to top
View user's profile Send private message
Crema83
Apprentice
Apprentice


Joined: 06 Oct 2004
Posts: 207
Location: Settimo Milanese (MI)

PostPosted: Fri Feb 18, 2005 11:39 pm    Post subject: Reply with quote

kaosone wrote:
allora imho c'e' qualche problema lato server.. non puoi dirci l'indirizzo? :?:


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
View user's profile Send private message
kaosone
Guru
Guru


Joined: 01 Feb 2004
Posts: 446

PostPosted: Fri Feb 18, 2005 11:46 pm    Post subject: Reply with quote

non dovrebbe.. prova ad usare datapipe con a es. www.google.it e vedi se va o no
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum