1, how to configure the network?
To China unicom to IP address, subnet mask, gateway, network cable without router, directly on the Linux host, has carried on the static IP configuration in Linux,
Don't know what to do so, right?
Method of 2, according to the above configuration, the server can access to the Internet, but through static IP other computer can't access this server
Whether cable directly connected to the host, or to a router?
External computer ping the host address, unable to access the target host,
How should I properly configured network?
CodePudding user response:
Is generally not recommended threw the server directly outside the network,Outside the network, routers, switches, office network/server
Then on the router, do mapping: access to the public network address port 80, transferred to the server LAN IP web service port
And, you need to set up your server (iptables or firewalld) firewall to allow access to the web service port
In addition, one important point: under the condition of your Settings are correct, probably still unable to access, then basically is blocked by China unicom drop port 80, need to find their open port 80, validation method is very simple, the web port refers to 81, 81 if outside network access, is allied to intercept, access networks outside 81, still is the problem of your Settings,
CodePudding user response:
Outside the network, routers, switches, office network/serverDo the network access server IP configuration is dynamic or static, does this is equivalent to a network server using the server do?
When external access server web applications can access the client from the server IP right?
Before this way, the router a fixed network address assigned to the server, then the server to do port mapping to the Intranet server, will get less than the client IP problems, all access to the server address is 192.168.1.1
CodePudding user response:
I suspect that is a question of your code, the code to obtain the address of the server to send it and seeCodePudding user response:
Language is PHP. The server will send the default