• jamnntpd and IPv6

    From Fabio Bizzi@2:335/364.3 to All on Tue Dec 3 21:35:49 2019
    Hello, All.

    Jamnntpd server 1.0 doesn't accept the connection if this is on IPv6, any hint? :)

    --
    Ciao! :)
    Fabio.
    --- Hotdoged/2.13.5/Android
    * Origin: ]\/[imac boss android point (2:335/364.3)
  • From Michiel van der Vlist@2:280/5555 to Fabio Bizzi on Tue Dec 3 22:36:29 2019
    Hello Fabio,

    On Tuesday December 03 2019 21:35, you wrote to All:

    Jamnntpd server 1.0 doesn't accept the connection if this is on IPv6,
    any hint? :)

    How about asking in the IPv6 area? That is where the Gurus are.


    Cheers, Michiel

    --- GoldED+/W32-MSVC 1.1.5-b20170303
    * Origin: http://www.vlist.eu (2:280/5555)
  • From Fabio Bizzi@2:335/364.3 to Michiel van der Vlist on Tue Dec 3 23:21:18 2019
    Hello, Michiel van der Vlist.
    On 03/12/19 22:36 you wrote:

    Jamnntpd server 1.0 doesn't accept the connection if this is on
    IPv6, any hint? :)
    How about asking in the IPv6 area? That is where the Gurus are.

    I've asked here because every other service included binkd works smoothly, so I suppose that it should be a jamnttpd server issue.

    But I'll follow your hint, I'll ask it also in the IPv6 echo. ;)

    Thank you.
    --
    Ciao! :)
    Fabio.
    --- Hotdoged/2.13.5/Android
    * Origin: ]\/[imac boss android point (2:335/364.3)
  • From Oli@2:280/464.47 to Fabio Bizzi on Tue Dec 3 23:20:25 2019
    Jamnntpd server 1.0 doesn't accept the connection if this is on IPv6,
    any hint? :)

    1.0? That version is 15 years old. The latest version is 1.3.

    Unfortunately it doesn't look like 1.3 has IPv6 support. Just run a TCP reverse proxy in front of it, like nginx, haproxy, stunnel, ...

    * Origin: kakistocracy (2:280/464.47)
  • From Alan Ianson@1:153/757 to Oli on Tue Dec 3 14:33:22 2019
    Hello Oli,

    Unfortunately it doesn't look like 1.3 has IPv6 support. Just run a
    TCP reverse proxy in front of it, like nginx, haproxy, stunnel, ...

    OMG! Do we need to proxy IPv6 too?

    A jamnntpd server has been on my list of things to do for a long time. I might even get to it at some point. :)

    Who maintains jamnntpd these days, anyone?

    It would be a definite plus if jamnntpd could support IPv6.

    Ttyl :-),
    Al

    --- GoldED+/LNX 1.1.5-b20180707
    * Origin: The Rusty MailBox - Penticton, BC Canada (1:153/757)
  • From Fabio Bizzi@2:335/364.1 to Alan Ianson on Wed Dec 4 08:14:26 2019
    Hello Alan!

    03 Dec 19 14:33, you wrote to Oli:

    A jamnntpd server has been on my list of things to do for a long time.
    I might even get to it at some point. :)

    If you run a 64bit linux prepare to a lot of pain! :(

    Who maintains jamnntpd these days, anyone?

    The 1.0 is maintained by Bjorn, the last 1.3 should be maintained by Robert James Clay http://ftnapps.sourceforge.net/index.html

    It would be a definite plus if jamnntpd could support IPv6.

    It would be a definite plus if jamnntpd could support ia64 linux! :(

    Ciao!
    Fabio

    --- GoldED+/LNX 1.1.5-b20180707
    * Origin: ]\/[imac Rebirth Boss Point (2:335/364.1)
  • From Tommi Koivula@2:221/0 to Fabio Bizzi on Wed Dec 4 10:13:44 2019
    Hello, Fabio Bizzi - All.
    On 03/12/2019 21.35 you wrote:

    Hello, All.
    Jamnntpd server 1.0 doesn't accept the connection if this is on IPv6,
    any hint? :)

    There is an ipv6 patch. My linux servers do support ipv6.

    I'll post it here as soon as I get back home.


    --
    Ciao! :)
    Fabio.

    --
    Tommi

    ---
    * Origin: nntp://rpi.rbb.bbs.fi (2:221/0)
  • From Fabio Bizzi@2:335/364.1 to Tommi Koivula on Wed Dec 4 09:30:00 2019
    Hello Tommi!

    04 Dec 19 10:13, you wrote to me:

    Hello, All.
    Jamnntpd server 1.0 doesn't accept the connection if this is on
    IPv6, any hint? :)

    There is an ipv6 patch. My linux servers do support ipv6.

    I'll post it here as soon as I get back home.

    Many thanks! ;)

    Ciao!
    Fabio

    --- GoldED+/LNX 1.1.5-b20180707
    * Origin: ]\/[imac Rebirth Boss Point (2:335/364.1)
  • From Oli@2:280/464.47 to Fabio Bizzi on Wed Dec 4 09:44:18 2019
    On Wed, 4 Dec 2019 08:14:26 +0100
    "Fabio Bizzi -> Alan Ianson" <1@364.335.2> wrote:

    A jamnntpd server has been on my list of things to do for a
    long time. I might even get to it at some point. :)

    If you run a 64bit linux prepare to a lot of pain! :(

    And 32-bit is unsupported by many linux distributions.

    It would be a definite plus if jamnntpd could support IPv6.

    It would be a definite plus if jamnntpd could support ia64 linux! :(

    It doesn't? I see 64-bit packages in Debian. Are they broken?

    ---
    * Origin: (2:280/464.47)
  • From Fabio Bizzi@2:335/364.1 to Oli on Wed Dec 4 11:00:30 2019
    Hello Oli!

    04 Dec 19 09:44, you wrote to me:

    It doesn't? I see 64-bit packages in Debian. Are they broken?

    In the answer many times the "To:" field is left empty. :(
    But it seems that this behaviour occours only on my system.

    Ciao!
    Fabio

    --- GoldED+/LNX 1.1.5-b20180707
    * Origin: ]\/[imac Rebirth Boss Point (2:335/364.1)
  • From Tommi Koivula@2:221/360 to Fabio Bizzi on Wed Dec 4 18:00:24 2019
    Hi Fabio.

    04 Dec 19 09:30:00, you wrote to me:

    Hello, All.
    Jamnntpd server 1.0 doesn't accept the connection if this is on
    IPv6, any hint? :)

    There is an ipv6 patch. My linux servers do support ipv6.

    I'll post it here as soon as I get back home.

    Many thanks! ;)

    Here it is. With this help I made my jamnntpd AND smapinntpd to listen ipv6 too.

    No warranty. :)

    === Cut === =====================================================================
    diff -urN ganjanntpd-1.9/main.c ganjanntpd-1.9-ipv6/main.c
    -+- ganjanntpd-1.9/main.c 2017-02-27 23:41:23.000000000 +0300
    +++ ganjanntpd-1.9-ipv6/main.c 2017-03-13 12:59:42.872717283 +0300
    @@ -223,16 +223,6 @@

    cfg_logfile=argv[++c];
    }
    - else if(stricmp(arg,"-ip")==0 || stricmp(arg,"-ipaddress")==0)
    - {
    - if(c+1 == argc)
    - {
    - printf("Missing argument for %s%s\n",argv[c],src);
    - return(FALSE);
    - }
    -
    - cfg_ipaddr=argv[++c];
    - }
    else if(stricmp(arg,"-config")==0)
    {
    if(filename)
    @@ -359,7 +349,6 @@
    fprintf(fp,"users \"%s\"\n",cfg_usersfile);
    fprintf(fp,"xlat \"%s\"\n",cfg_xlatfile);
    fprintf(fp,"hostname \"%s\"\n",cfg_hostname);
    - fprintf(fp,"ipaddress \"%s\"\n",cfg_ipaddr);
    fprintf(fp,"logfile \"%s\"\n",cfg_logfile);
    fprintf(fp,"%snoecholog\n",cfg_noecholog ? "" : "#");
    fprintf(fp,"%sdebug\n",cfg_debug ? "" : "#");
    @@ -401,7 +390,7 @@
    {
    SOCKET sock;
    int error,res;
    - struct sockaddr_in local;
    + struct sockaddr_in6 local;
    fd_set fds;
    struct timeval tv;
    FILE *fp;
    @@ -501,7 +490,7 @@
    exit(10);
    }

    - sock = socket(PF_INET,SOCK_STREAM,IPPROTO_TCP);
    + sock = socket(PF_INET6,SOCK_STREAM,IPPROTO_TCP);

    if(sock == INVALID_SOCKET)
    {
    @@ -518,9 +507,8 @@

    memset(&local, 0, sizeof(local) );

    - local.sin_family = AF_INET;
    - local.sin_addr.s_addr = (cfg_ipaddr && strcmp(cfg_ipaddr,"0.0.0.0") != 0) ? inet_addr(cfg_ipaddr) : INADDR_ANY;
    - local.sin_port = htons(cfg_port);
    + local.sin6_family = AF_INET6;
    + local.sin6_port = htons(cfg_port);

    error = bind(sock,(struct sockaddr *)&local,sizeof(local));

    @@ -550,7 +538,7 @@
    exit(10);
    }

    - os_logwrite(SERVER_NAME " " SERVER_VERSION " is running on %s:%d",cfg_ipaddr,cfg_port);
    + os_logwrite(SERVER_NAME " " SERVER_VERSION " is running on port %d",cfg_port);

    if(cfg_debug)
    os_logwrite("Compiled " __DATE__ " " __TIME__);



    n


    diff -urN ganjanntpd-1.9/nntpserv.c ganjanntpd-1.9-ipv6/nntpserv.c
    -+- ganjanntpd-1.9/nntpserv.c 2017-03-10 09:54:41.000000000 +0300
    +++ ganjanntpd-1.9-ipv6/nntpserv.c 2017-03-13 13:01:18.239794707 +0300
    @@ -15,7 +15,6 @@

    uchar *cfg_allowfile = CFG_ALLOWFILE;
    uchar *cfg_groupsfile = CFG_GROUPSFILE;
    -uchar *cfg_ipaddr = CFG_IPADDR;
    uchar *cfg_logfile = CFG_HOSTNAME;
    uchar *cfg_usersfile = CFG_USERSFILE;
    uchar *cfg_xlatfile = CFG_XLATFILE;
    @@ -3093,8 +3092,8 @@
    struct var var;

    struct hostent *hostent;
    - struct sockaddr_in fromsa;
    - int fromsa_len = sizeof(struct sockaddr_in);
    + struct sockaddr_in6 fromsa;
    + int fromsa_len = sizeof(struct sockaddr_in6);

    os_getexclusive();
    server_openconnections++;
    @@ -3156,16 +3155,16 @@
    return;
    }

    - sprintf(var.clientid,"%s:%u",inet_ntoa(fromsa.sin_addr),ntohs(fromsa.sin_port));
    + inet_ntop(AF_INET6, &fromsa.sin6_addr, lookup, sizeof(lookup));

    - mystrncpy(lookup,inet_ntoa(fromsa.sin_addr),200);
    + snprintf(var.clientid,200,"%s:%u",lookup,ntohs(fromsa.sin6_port));

    - if((hostent=gethostbyaddr((char *)&fromsa.sin_addr,sizeof(fromsa.sin_addr),AF_INET)))
    + if((hostent=gethostbyaddr((char *)&fromsa.sin6_addr,sizeof(fromsa.sin6_addr),AF_INET6)))
    mystrncpy(lookup,hostent->h_name,200);

    os_logwrite("(%s) Connection established to %s",var.clientid,lookup);

    - if(!checkallow(&var,inet_ntoa(fromsa.sin_addr)))
    + if(!checkallow(&var,lookup))
    {
    socksendtext(&var,"502 Access denied." CRLF);
    os_logwrite("(%s) Access denied (not in allow list)",var.clientid);


    diff -urN ganjanntpd-1.9/nntpserv.h ganjanntpd-1.9-ipv6/nntpserv.h
    -+- ganjanntpd-1.9/nntpserv.h 2017-02-27 23:15:13.000000000 +0300
    +++ ganjanntpd-1.9-ipv6/nntpserv.h 2017-03-13 12:59:11.824692072 +0300
    @@ -108,7 +108,6 @@
    #define CFG_LOGFILE LOG_BASEPATH "ganjanntpd.log"

    #define CFG_HOSTNAME "GaNJaNNTPd!not-for-mail"
    -#define CFG_IPADDR "0.0.0.0"

    #define CFG_DEF_FLOWED TRUE
    #define CFG_DEF_SHOWTO TRUE
    @@ -118,7 +117,6 @@
    extern uchar *cfg_allowfile;
    extern uchar *cfg_groupsfile;
    extern uchar *cfg_hostname;
    -extern uchar *cfg_ipaddr;
    extern uchar *cfg_logfile;
    extern uchar *cfg_usersfile;
    extern uchar *cfg_xlatfile; =====================================================================

    And make sure sysctl net.ipv6.bindv6only=0 for ipv4 to work as well.

    -+- Claws Mail 3.14.0 (GTK+ 2.24.30; x86_64-pc-linux-gnu)
    + Origin: Via 2:5019/40 NNTP (GaNJaNET STaTi0N, Smolensk) (2:5019/40.1)
    === Cut ===

    'Tommi

    ... \\ZPO has been up for: 319 day(s), 4 hour(s), 41 minute(s), 25 second(s) ---
    * Origin: - rbb.fidonet.fi - Finland - (2:221/360)
  • From Tommi Koivula@2:221/360 to Oli on Wed Dec 4 18:17:14 2019

    AI>> A jamnntpd server has been on my list of things to do for a
    AI>> long time. I might even get to it at some point. :)

    FB> If you run a 64bit linux prepare to a lot of pain! :(

    And 32-bit is unsupported by many linux distributions.

    Runs fine in this Raspberry PI2. Ubuntu 32bit :)

    ... Ubuntu 16.04.6 LTS (GNU/Linux 4.4.0-1125-raspi2 armv7l) ...

    'Tommi

    ---
    * Origin: nntp://rpi.rbb.bbs.fi (2:221/360)
  • From Fabio Bizzi@2:335/364.1 to Tommi Koivula on Wed Dec 4 19:28:44 2019
    Hello Tommi!

    04 Dec 19 18:00, you wrote to me:

    Here it is. With this help I made my jamnntpd AND smapinntpd to listen ipv6 too.

    No warranty. :)

    Thak you, but I think that the paste has had a problem here:

    [...]
    if(cfg_debug)
    os_logwrite("Compiled " __DATE__ " " __TIME__);



    n


    diff -urN ganjanntpd-1.9/nntpserv.c ganjanntpd-1.9-ipv6/nntpserv.c
    [...]

    Please could you check it? :)

    Ciao!
    Fabio

    --- GoldED+/LNX 1.1.5-b20180707
    * Origin: ]\/[imac Rebirth Boss Point (2:335/364.1)
  • From Tommi Koivula@2:221/360 to Fabio Bizzi on Thu Dec 5 09:22:30 2019
    Hi Fabio.

    04 Dec 19 19:28:44, you wrote to me:

    [...]
    if(cfg_debug)
    os_logwrite("Compiled " __DATE__ " " __TIME__);



    n


    diff -urN ganjanntpd-1.9/nntpserv.c ganjanntpd-1.9-ipv6/nntpserv.c
    [...]

    Please could you check it? :)

    It is just like that in my saved text file. The "n" must be just a typo.

    Ok, I found the original message from Konstantin Kuzov, dated 13 Mar 2017. I'll forward it here.

    'Tommi

    ---
    * Origin: - rbb.fidonet.fi - Finland - (2:221/360)
  • From Oli@2:280/464.47 to Tommi Koivula on Thu Dec 5 09:29:58 2019
    Tommi Koivula wrote:

    Hello, All.
    Jamnntpd server 1.0 doesn't accept the connection if this is on
    IPv6, any hint? :)

    There is an ipv6 patch. My linux servers do support ipv6.

    I'll post it here as soon as I get back home.

    Many thanks! ;)

    Here it is. With this help I made my jamnntpd AND smapinntpd to
    listen ipv6 too.

    It would be nice if IPv6 could be added to upstream.

    Does this patch really work with jamnntpd? It removes all the cfg_ipaddr stuff that isn't in jamnntpd 1.3.

    ---
    * Origin: (2:280/464.47)
  • From Tommi Koivula@2:221/6 to Oli on Thu Dec 5 10:40:36 2019

    Does this patch really work with jamnntpd? It removes all the cfg_ipaddr stuff that isn't in jamnntpd 1.3.

    Try "telnet rpi.rbb.bbs.fi 1119"

    ---
    * Origin: nntps://news.fidonet.fi (2:221/6.0)
  • From Oli@2:280/464.47 to Tommi Koivula on Thu Dec 5 10:00:59 2019
    On Thu, 5 Dec 2019 10:40:36 +0200
    "Tommi Koivula -> Oli" <0@6.221.2> wrote:

    Does this patch really work with jamnntpd? It removes all the
    cfg_ipaddr stuff that isn't in jamnntpd 1.3.

    Try "telnet rpi.rbb.bbs.fi 1119"

    is telnet a patch command? ;)

    I tried to apply the patch, didn't work.

    $ patch < ipv6-patch
    patching file main.c
    Hunk #1 FAILED at 223.
    Hunk #2 FAILED at 359.
    Hunk #3 FAILED at 401.
    Hunk #4 FAILED at 501.
    Hunk #5 FAILED at 518.
    Hunk #6 FAILED at 550.
    6 out of 6 hunks FAILED -- saving rejects to file main.c.rej
    patching file nntpserv.c
    Hunk #1 FAILED at 15.
    Hunk #2 FAILED at 3093.
    Hunk #3 FAILED at 3156.
    3 out of 3 hunks FAILED -- saving rejects to file nntpserv.c.rej
    patching file nntpserv.h
    Hunk #1 FAILED at 108.
    Hunk #2 FAILED at 118.
    2 out of 2 hunks FAILED -- saving rejects to file nntpserv.h.rej

    ---
    * Origin: (2:280/464.47)
  • From Tommi Koivula@2:221/360 to Oli on Thu Dec 5 11:27:42 2019

    ˇOTK>> Does this patch really work with jamnntpd? It removes all the
    ˇOTK>> cfg_ipaddr stuff that isn't in jamnntpd 1.3.

    Try "telnet rpi.rbb.bbs.fi 1119"

    is telnet a patch command? ;)

    Sure! ;)

    I tried to apply the patch, didn't work.

    I said that I made the changes with help of this. I never asked anyone to try to apply it directly.

    'Tommi

    ---
    * Origin: nntp://rbb.fidonet.fi - Lake Ylo - Finland (2:221/360)
  • From Michiel van der Vlist@2:280/5555 to Tommi Koivula on Thu Dec 5 10:07:21 2019
    Hello Tommi,

    On Thursday December 05 2019 10:40, you wrote to Oli:

    Try "telnet rpi.rbb.bbs.fi 1119"

    D:\FIDO\IPV6>telnet rpi.rbb.bbs.fi 1119
    Verbindungsaufbau zu rpi.rbb.bbs.fi...Es konnte keine Verbindung mit dem Host hergestellt
    werden, auf Port 1119: Verbinden fehlgeschlagen

    D:\FIDO\IPV6>


    Cheers, Michiel

    --- GoldED+/W32-MSVC 1.1.5-b20170303
    * Origin: http://www.vlist.eu (2:280/5555)
  • From Oli@2:280/464.47 to Tommi Koivula on Thu Dec 5 10:49:36 2019
    On Thu, 5 Dec 2019 11:27:42 +0200
    "Tommi Koivula -> Oli" <0@360.221.2> wrote:

     OTK>>>> Does this patch really work with jamnntpd? It removes all the
     OTK>>>> cfg_ipaddr stuff that isn't in jamnntpd 1.3.

     TK>>> Try "telnet rpi.rbb.bbs.fi 1119"

    is telnet a patch command? ;)

    Sure! ;)

    I tried to apply the patch, didn't work.

    I said that I made the changes with help of this. I never asked
    anyone to try to apply it directly.

    Okay, then I misunderstood your previous mail with the patch.

    ---
    * Origin: (2:280/464.47)
  • From Tommi Koivula@2:221/6 to Michiel van der Vlist on Thu Dec 5 11:48:00 2019
    On 05.12.2019 10:07, Michiel van der Vlist - Tommi Koivula :

    On Thursday December 05 2019 10:40, you wrote to Oli:

    Try "telnet rpi.rbb.bbs.fi 1119"

    D:\FIDO\IPV6>telnet rpi.rbb.bbs.fi 1119
    Verbindungsaufbau zu rpi.rbb.bbs.fi...Es konnte keine Verbindung mit dem Host hergestellt
    werden, auf Port 1119: Verbinden fehlgeschlagen

    StĀtzen Sie nicht IPV6? :D

    It IS answering...

    05-Dec-19 10:43:24 (2001:41d0:701:1100::942:52476) Connection established to kco.fidonet.fi
    05-Dec-19 10:43:34 (2001:41d0:701:1100::942:52476) Connection closed
    05-Dec-19 11:07:04 (2a02:4d80:602:2:8000::f8:49338) Connection established to 2a02:4d80:602:2:8000::f8
    05-Dec-19 11:07:20 (2a02:4d80:602:2:8000::f8:49338) Connection closed

    ---
    * Origin: nntps://news.fidonet.fi (2:221/6.0)