WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Webserver with IPv6 support  (Read 7406 times)

paco

  • Guest
Webserver with IPv6 support
« on: January 20, 2014, 09:49:57 AM »
Hi all,

I wanted to install a webserver with IPv6 support. I tried pythons SimpleHTTPServer and mongoose, but both listen on 0.0.0.0:80 only.

Does anyone has an idea for a workaround (proxying, port forwarding, ...) or did I miss another webserver currently available as tcz?

Cheers,
Patrick

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Webserver with IPv6 support
« Reply #1 on: January 20, 2014, 09:53:09 AM »
Which piCore version?
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

paco

  • Guest
Re: Webserver with IPv6 support
« Reply #2 on: January 20, 2014, 10:19:39 AM »
It's piCore 5.1 rc4.

Cheers,
Patrick

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Webserver with IPv6 support
« Reply #3 on: January 20, 2014, 10:48:02 AM »
Install the ipv6....tcz package from the repo
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

paco

  • Guest
Re: Webserver with IPv6 support
« Reply #4 on: January 20, 2014, 10:54:59 AM »
I did. IPv6 works fine, but mongoose seems not to be compiled with IPv6 support.

Code: [Select]
tc@box:~$ netstat -an
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN     
tcp        0      0 :::22                   :::*                    LISTEN     
tcp        0      0 fe80::ba27:ebff:febd:----:22 fe80::201:2eff:fe2b:----:37797 ESTABLISHED
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags       Type       State         I-Node Path
unix  2      [ ACC ]     SEQPACKET  LISTENING       1114 /run/udev/control
unix  3      [ ]         DGRAM                      1124
unix  3      [ ]         DGRAM                      1123

I tried manually with an IPv6 Socket, but mongoose does not reckon it.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Webserver with IPv6 support
« Reply #5 on: January 20, 2014, 11:18:45 AM »
I do not remember wether IPV6 was enabled or not.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

paco

  • Guest
Re: Webserver with IPv6 support
« Reply #6 on: January 21, 2014, 11:10:59 AM »
IPv6 seems to be disabled for mongoose. Temporarily I installed a reverse proxy listening on port 80 redirecting to mongoose on port 8080.

For the reverse proxy I use nodejs with http-proxy (minor patch to enable ipv6 support) and:
Code: [Select]
var http = require('http'),
    httpProxy = require('http-proxy');

httpProxy.createProxyServer({target:'http://127.0.0.1:8080'}).listen(80, '::');

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Webserver with IPv6 support
« Reply #7 on: January 21, 2014, 11:41:06 AM »
I will enable in next update when I get time, thanks for reporting, thanks for reporting missing ipv6
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Webserver with IPv6 support
« Reply #8 on: January 31, 2014, 01:51:16 PM »
Mongoose updated and ipv6 enabled. Please try ipv6, I had no time to test.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

paco

  • Guest
Re: Webserver with IPv6 support
« Reply #9 on: February 06, 2014, 10:43:38 PM »
Hi Markus,

IPv6 works fine, but when I use IPv4 only, mongoose won't start like before, even with explicitely declared interface:

Code: [Select]
tc@box:~$ sudo mongoose -listening_ports 80
set_ports_option: cannot bind to 80: Address family not supported by protocol
Failed to start Mongoose.

tc@box:~$ sudo mongoose -listening_ports 0.0.0.0:80
set_ports_option: cannot bind to 0.0.0.0:80: Address family not supported by protocol
Failed to start Mongoose.

tc@box:~$ sudo mongoose -listening_ports 192.168.0.111:80
set_ports_option: cannot bind to 192.168.0.111:80: Address family not supported by protocol
Failed to start Mongoose.

Code: [Select]
tc@box:~$ tce-load -i /mnt/mmcblk0p2/tce/optional/ipv6-3.12.1-piCore\+.tcz
/mnt/mmcblk0p2/tce/optional/ipv6-3.12.1-piCore+.tcz: OK
tc@box:~$ sudo modprobe ipv6

tc@box:~$ sudo mongoose -listening_ports 80
Mongoose web server v. 3.8 started on port(s) 80 with web root [.]

What do you think about two packages, monoogse and mongoose_ipv6?

Cheers,
Patrick

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Webserver with IPv6 support
« Reply #10 on: February 07, 2014, 12:53:22 AM »
Hm... It need some investigation wether is it possible to have both in one version. If you have some time, can you check theit mailing list, forum or contact author?

Do you need dropbear or another WEB server would be OK? I have Apache 2.4.7 running, just need to polish startup scripts, etc. But I can send you as it is now for testing.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

paco

  • Guest
Re: Webserver with IPv6 support
« Reply #11 on: February 07, 2014, 09:37:19 AM »
There is no urgent need for another web server. The workaround using a reverse proxy works fine.

I will check mongoose project page and issue list if I can find some details about IPv4/IPv6 stuff.

paco

  • Guest
Re: Webserver with IPv6 support
« Reply #12 on: February 08, 2014, 03:17:58 AM »
There is an issue on the project page:
"Poor behavior on kernel without IPv6 support when compiled with USE_IPV6"
https://code.google.com/p/mongoose/issues/detail?id=393

... but no fix, yet.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Webserver with IPv6 support
« Reply #13 on: February 08, 2014, 04:45:07 AM »
DO you advice to have two mongoose packagese, one for ipv4 and one for ipv6?
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

paco

  • Guest
Re: Webserver with IPv6 support
« Reply #14 on: February 08, 2014, 07:13:37 AM »
Yes - two packages would be nice.

Furthermore I will track the bug and report if a solution was found.