It is currently Wed, 20 Mar 2019 06:38:57 GMT



 
Author Message
 identd
I can't get on irc because I'm not running an identd.  I want to get on
with my win2k machine which is behind a freebsd gateway to the
internet.  I've tried doing
natd -redirect_port 192.168.0.2:113 113
where 192.168.0.2 is my win2k's IP.
But that doesn't work...am i screwing something up?
Also, I'd rather just run ident on my bsd machine...I think.  Assuming
that's the proper fix, how would I go about that?
I uncomment some lines in /etc/inetd.conf, but whenever I tried to
connect with the win2k machine, the freebsd box spams errors cuz I have
no /usr/local/sbin/ident
So I went looking in the ports and found oident, installed that, and
changed the line in /etc/inetd.conf to refer to oident instead of ident,
but that doesn't work either.
I have no idea what to do, please help me =/


 Thu, 25 Dec 2003 11:39:50 GMT   
 identd
Look on freshmeat.net for a program called fakeident
it's just a c code to compile and run, and it works


 Thu, 25 Dec 2003 19:41:29 GMT   
 identd
I can't get it to work =/
I compile it, but from there I'm not sure what to do.
I followed a link from freshmeat that had a MakeFile to install it, but the
places it looked to try and add stuff didn't exist on my machine, I guess cuz
the Makefile was for linux.
I *think* I need to add some lines to /etc/inetd.conf
But i don't know what to add
The makefile I saw suggested something along the lines of
"ident stream tcp wait nobody /sbin/identd ${USER} >> /etc/inetd.conf"
I currently have commented lines in inetd.conf that say:
#auth stream tcp wait nobody /usr/local/sbin/identd identd -w -t120
Uncommented that doesn't work either tho.  When I try to connect to an IRC
server it can't get an ident response. I get spammed with error messages that
say it can't bind() to the address or something.  Basically I'm going about it
all wrong...
manually just running "identd nobody" sorta works.
The irc server gets an ident response, but I get autokilled for using an
insecure proxy server, "if you are not connectin via a proxy, please reset
your ident"
Thx for your help so far.


 Fri, 26 Dec 2003 03:32:20 GMT   
 identd
I'm getting further...I think.
I put this line in my /etc/inetd.conf

auth stream tcp wait nobody /usr/local/sbin/identd nobody

When I try to connect to irc from behind the gateway, the freebsd box spams...

identd: cannot bind() server socket: Permission denied.
inetd[301]: /usr/local/sbin/identd[609]: exit status 0xf00

...about a hundred times until the irc server decides i'm not gonna reply I guess,
and stops trying to ident me.
Am I doing something that's denying identd permission to bind the server socket?
thx...



 Fri, 26 Dec 2003 04:15:41 GMT   
 identd

I had the same problem
-install oidentd-1.7.1 from the port collection
-read the man page
-In the /etc/inetd.conf add this :
  auth    stream  tcp     nowait  root  /usr/local/sbin/oidentd oidentd
-i -x fkident -S s

enjoy



 Fri, 26 Dec 2003 04:15:29 GMT   
 identd
It works!  Thanks a bunch.
If you don't mind two more questions...
Rebooting everytime I wanted to change inetd.conf got old really fast.  Is the
only way to restart inetd to kill his pid from /var/run/inetd.pid and start it
again?
What's the second lower case s for, after -S?  I see -s in the man page...but
I can't figure out what s is supposed to do.
Again, thank you a lot.


 Fri, 26 Dec 2003 04:39:45 GMT   
 identd
Fake ident is extrmely easy to use... I just start it from /etc/rc.local like this:

/usr/local/sbin/identd bleh

and my identd shows up as bleh
that will affect every machine on the lan (they'll all have the same ident)... I haven't checked into advanced features of this proggy since I don't need them, but I was about to reinstall it (had to reinstall fbsd 4.2 because I broke it :P) and I'll check into it... I can post results here if you want



 Fri, 26 Dec 2003 10:32:32 GMT   
 identd

kill -HUP `cat /var/run/inetd.pid`
or
killall -HUP inetd

will do it



 Fri, 26 Dec 2003 10:33:31 GMT   
 identd
I know you've setup identd. But I find that giving out a real ident is
not really a good idea. So here's a source that will give you a random
ident. I obtained some of the functions from the identd distribution,
so my acknowledges to the author.

Compile with "gcc identd.c -o identd". Replace your existing identd
with it.

Leon.
-----------

/*
 * Random identd generator. Runs under inetd
 *
 */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <sys/stat.h>
#include <errno.h>
#include <netdb.h>
#include <signal.h>
#include <fcntl.h>
#include <unistd.h>

#include <sys/types.h>
#include <sys/param.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <sys/file.h>
#include <sys/time.h>
#include <sys/wait.h>

#include <netinet/in.h>
#include <arpa/inet.h>

#include <syslog.h>

#define USE_TIME_SEED 0
#define IO_TIMEOUT    30

extern int errno;

/*
 * Returns 0 on timeout, -1 on error, #bytes read on success.
 */
ssize_t timed_read(int fd, void *buf, size_t siz, time_t timeout)
{
        int error, tot = 0, i, r;
        char *p = buf;
        fd_set readfds;
        struct timeval tv, start, after, duration, tmp;

        tv.tv_sec = timeout;
        tv.tv_usec = 0;

        while (1) {
                FD_ZERO(&readfds);
                FD_SET(fd, &readfds);

                gettimeofday(&start, NULL);
                if ((error = select(fd + 1, &readfds, 0, 0, &tv)) <=
0)
                        return error;
                r = read(fd, p, siz - tot);
                if (r == -1 || r == 0)
                        return (r);
                for (i = 0; i < r; i++)
                        if (p[i] == '\r' || p[i] == '\n') {
                                tot += r;
                                return (tot);
                        }
                gettimeofday(&after, NULL);
                timersub(&start, &after, &duration);
                timersub(&tv, &duration, &tmp);
                tv = tmp;
                if (tv.tv_sec < 0 || !timerisset(&tv))
                        return (tot);
                tot += r;
                p += r;
        }

/*
 * Returns 0 on timeout, -1 on error, #bytes read on success.
 */
ssize_t timed_write(int fd, const void *buf, size_t siz, time_t
timeout)
{
        int error;
        fd_set writeds;
        struct timeval tv;

        FD_ZERO(&writeds);
        FD_SET(fd, &writeds);

        tv.tv_sec = timeout;
        tv.tv_usec = 0;

        if ((error = select(fd + 1, 0, &writeds, 0, &tv)) <= 0)
                return error;
        return(write(fd, buf, siz));

int main()
{
        int i;
        char c;
        static char buf[4096];
        static char buf2[4096];
        static char randstr[12];
        struct sockaddr_in sin;
        struct timeval tv;
        int len;
        int sock;

        len = sizeof(sin);
        sock = accept(0, (struct sockaddr *)&sin, &len);
        if (sock < 0) {
                syslog(LOG_ERR, "accept failed: %s", strerror(errno));
                perror("identd: accept()");
                exit(1);
        }
        syslog(LOG_NOTICE, "connection from: %s", inet_ntoa(sin.sin_addr));

        memset(buf, 0, sizeof(buf));
        if ((i = timed_read(sock, buf, sizeof(buf)-1, IO_TIMEOUT)) <= 0) {
                perror("identd: read()");
                i = snprintf(buf, sizeof(buf), "%d, %d : ERROR : UNKNOWN-ERROR\r\n",
                             0, 0);
                timed_write(sock, buf, i, IO_TIMEOUT);
                return 0;
        }
        buf[i] = '\0';
        for (i = 0; buf[i]; ++i) {
                if (buf[i] == '\r' || buf [i] == '\n') {
                        buf[i] = '\0';
                        break;
                }
        }

#if USE_TIME_SEED
        srand(time(NULL));
#else
        /*
         * Base the seed on the request just in case we are asked
         * for the same details... (be cheeky)
         *
         */
        i = 0;
        for (c = 0; c < 30; c++) {
                i ^= buf[c]; /* Perform XORs... */
        }
        srand(i);
#endif
        for (i = 0; i < 5; i++) {
                randstr[i] = (rand() % 26) + 'a';
        }
        for (; i < 7; i++) {
                randstr[i] = (rand() % 10) + '0';
        }
        randstr[i] = '\0';
        i = snprintf(buf2, sizeof(buf2), "%s : USERID : UNIX : %s\r\n",
                     buf, randstr);
        timed_write(sock, buf2, i, IO_TIMEOUT);
        return 0;



 Sun, 04 Jan 2004 09:55:05 GMT   
 
   [ 9 post ] 

Similar Threads

1. identd service enabled in X system config, identd loaded at boot, but no identd -- help

2. mozilla squid identd

3. difficulty with IDENTD and KVIRC

4. I need help with forwarding of identd requests

5. Multiple mingetty, identd and httpd processes

6. Setting up identd

7. Identd Problems

8. identd and Redhat 6.2

9. /usr/sbin/in.identd missing?

10. RH6..identd and irc???


 
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software