Node.JS Server SYN泛洪DoS攻击漏洞?

时间:2016-04-18 07:15:08

标签: node.js security ubuntu lamp

我有两台VPS Ubuntu服务器受到SYN Flood DoS攻击的攻击。

服务器环境是在port:3000上运行的Node.js服务器,我开始以root用户身份使用pm2守护程序。

我还有LAMP(Apache Web服务器,PHP,MySQL和phpMyAdmin)在相同的VPS上运行(默认端口:80)MySQL和phpMyAdmin都是安全的。

我的问题是,通过pm2作为root用户在port:3000上运行我的节点服务器脚本是否安全?我已经在多个网站上阅读了它的安全性,除非它在端口上运行:80。 - 显然,Web服务器文件夹(位于外面)无法访问节点服务器脚本。

我也读过它不安全的运行" div"以root用户身份登录。设置一个安全的用户"会更安全。 (要求输入密码)。 > source(1)或执行此操作> source(2)

任何人都有任何提示如何锁定Node.js?

1 个答案:

答案 0 :(得分:0)

我的NodeJS服务器仍然被黑客攻击!在使用 using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data; using System.Data.OleDb; public partial class toyota : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { OleDbConnection connect = new OleDbConnection(); connect.ConnectionString = @"Provider=Microsoft.ACE.OLEDB.12.0; Data Source=C:\Users\Student\Documents\Visual Studio 2013\WebSites\WebSite1\Dealership.accdb"; connect.Open(); OleDbCommand cmd = new OleDbCommand("SELECT Car FROM Table1 WHERE dealer = Toyota", connect); OleDbDataAdapter adapter = new OleDbDataAdapter(cmd); DataTable dt = new DataTable(); adapter.Fill(dt); GridView1.DataSource = dt; GridView1.DataBind(); } } 锁定pm2用户后,未"safe user"用作node用户。

所以我开始四处寻找这些害虫进入的其他方式。我遇到了Node Client / Server通信的身份验证方法。这是使用唯一键/代码查询服务器的简便方法。如果服务器未在查询参数中收到正确的密钥/代码,则拒绝客户端的连接。

客户端:

root

服务器端:

var socket = io("http://127.0.0.1:3000/", { query: "foo=bar" });

到目前为止,如果它不起作用,将报告回来。