[WAD] inetd + lighttpd + REMOTE_ADDR environment variable change
Hi team,
Using the inetd with lighttpd with below as config.
80www stream tcp6 nowait 1006 /sbin/lighttpd -1 -i 1200 -f /var/etc/lighttpd.conf
I use REMOTE_ADDR variable for the one of the validation purpose.
When I used to run as daemon , it was perfect with x.x.x.x . Now with inetd I get different value as "::ffff:192.168.1.1"
Any idea why this difference ?.
Thanks
vlrk
Replies (5)
RE: inetd + lighttpd + REMOTE_ADDR environment variable change - Added by vlrk 2 months ago
version details are : lighttd-1.4.69
Running in Linux 4.19.183 of aarch64 .
RE: inetd + lighttpd + REMOTE_ADDR environment variable change - Added by gstrauss 2 months ago
https://en.wikipedia.org/wiki/IPv6_address#Transition_from_IPv4
You can check if the inetd on your system allows you to configure the listening addresses to enable IPv4-mapped or not (setsockopt()
IPV6_V6ONLY
), or check your OS settings.
This forum is for lighttpd, not inetd or general systems administration, so please take the above information and use a search engine to understand IPv4-mapped addresses.
RE: inetd + lighttpd + REMOTE_ADDR environment variable change - Added by gstrauss 2 months ago
80 www stream tcp6 nowait 1006 /sbin/lighttpd -1 -i 1200 -f /var/etc/lighttpd.conf
Why are you using tcp6
?
RE: inetd + lighttpd + REMOTE_ADDR environment variable change - Added by vlrk 26 days ago
Hi glen,
Currently in my target board , running bit older inetd version (probably adapted from uclinux distribution).
This only support tcp6 or tcp as protocol.
Here I need both ipv4 and ipv6 to be supported for 80 port , so the reason keeping tcp6 here.
Thanks
RE: inetd + lighttpd + REMOTE_ADDR environment variable change - Added by gstrauss 26 days ago
When I used to run as daemon , it was perfect with x.x.x.x . Now with inetd I get different value as "::ffff:192.168.1.1"
lighttpd run as a daemon sets up listening sockets and lighttpd.conf server.v4mapped = "disable"
is the default.
lighttpd -1
is being passed the connected socket by inetd. Learn how to configure your inetd and your kernel, or, better, handle ipv4-mapped addresses in REMOTE_ADDR for your validation purposes.
This forum is for lighttpd, not inetd or general systems administration, so please take the above information and use a search engine to understand IPv4-mapped addresses.