I have been playing with all firmware versions since I got this modem. Recently with the latest firmware something weird I’ve noticed! The port 2000 is listening by Nginx web server on 0.0.0.0!
root@GL-X3000:~# netstat -tuplna | grep nginx
tcp 0 0 0.0.0.0:2000 0.0.0.0:* LISTEN 5745/nginx.conf -g
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 5745/nginx.conf -g
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 5745/nginx.conf -g
tcp 0 0 :::2000 :::* LISTEN 5745/nginx.conf -g
tcp 0 0 :::80 :::* LISTEN 5745/nginx.conf -g
tcp 0 0 :::443 :::* LISTEN 5745/nginx.conf -g
udp 0 0 127.0.0.1:50735 127.0.0.1:53 ESTABLISHED 5852/nginx: worker
udp 0 0 127.0.0.1:41302 127.0.0.1:53 ESTABLISHED 5853/nginx: worker
And when I grep for this port number (2000) in the Nginx config file, nothing in there!
root@GL-X3000:~# grep -rn '2000\|443\|80' /etc/nginx/
/etc/nginx/conf.d/gl.conf:11: listen 80;
/etc/nginx/conf.d/gl.conf:12: listen [::]:80;
/etc/nginx/conf.d/gl.conf:14: listen 443 ssl;
/etc/nginx/conf.d/gl.conf:15: listen [::]:443 ssl;
/etc/nginx/nginx.conf_old:36: listen 80;
/etc/nginx/nginx.conf_old:57: # proxy the PHP scripts to Apache listening on 127.0.0.1:80
/etc/nginx/nginx.conf_old:85: # listen 8000;
/etc/nginx/nginx.conf_old:86: # listen somename:8080;
/etc/nginx/nginx.conf_old:99: # listen 443 ssl;
Further investigating it, let’s check first the normal Nginx ports:
root@GL-X3000:~# curl -k https://127.0.0.1:443
<!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="Cache-Control" content="no-cache,no-store,must-revalidate" ?>............ truncated
root@GL-X3000:~# curl http://127.0.0.1:80
<!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="Cache-Control" content="no-cache,no-store,must-revalidate" ?>............ truncated
Now, Checking Nginx port 2000:
root@GL-X3000:~# curl http://127.0.0.1:2000
<html>
<head><title>400 The plain HTTP request was sent to HTTPS port</title></head>
<body>
<center><h1>400 Bad Request</h1></center>
<center>The plain HTTP request was sent to HTTPS port</center>
<hr><center>nginx/1.17.7</center>
</body>
</html>
root@GL-X3000:~# curl -k https://127.0.0.1:2000
<html>
<head><title>302 Found</title></head>
<body>
<center><h1>302 Found</h1></center>
<hr><center>nginx/1.17.7</center>
</body>
</html>
Can GL engineers comment on this behavior? Hopefully not a backdoor hahah