Test connectivity for the web service: Difference between revisions
Jump to navigation
Jump to search
m
→Connecting from the local machine to web service at the same server
| Line 2: | Line 2: | ||
== Connecting from the local machine to web service at the same server == | |||
WAN ○ -------> ○ LAN -------> <span style="color:red">● server</span> | WAN ○ -------> ○ LAN -------> <span style="color:red">● server</span> | ||
Testing on localhost if you have the administrative permission to manage the server. | Testing on localhost if you have the administrative permission to manage the server. | ||
=== Check if your computer/server Is being assigned the IP Address === | |||
** {{Linux}}: (1) Check the IP Address. {{kbd | key = ifconfig}}. (2) Re-assign the IP Address and restart the networking service. {{kbd | key = service network restart}} for CentOS<ref>[http://askubuntu.com/questions/230698/how-to-restart-the-networking-service How to restart the networking service? - Ask Ubuntu]</ref> | ** {{Linux}}: (1) Check the IP Address. {{kbd | key = ifconfig}}. (2) Re-assign the IP Address and restart the networking service. {{kbd | key = service network restart}} for CentOS<ref>[http://askubuntu.com/questions/230698/how-to-restart-the-networking-service How to restart the networking service? - Ask Ubuntu]</ref> | ||
** {{Win}}: Check the IP Address. {{kbd | key = ifconfig/all}} | ** {{Win}}: Check the IP Address. {{kbd | key = ifconfig/all}} | ||
** More on [[Network problem]] | ** More on [[Network problem]] | ||
=== Is the service alive or the port was occupied by other process? === | |||
** {{Linux}} | ** {{Linux}} | ||
*** [http://linux.die.net/man/1/nmap nmap] "Network exploration tool and security / port scanner." e.g. {{kbd | key = <nowiki>nmap -p 80,443 ip</nowiki>}} | *** [http://linux.die.net/man/1/nmap nmap] "Network exploration tool and security / port scanner." e.g. {{kbd | key = <nowiki>nmap -p 80,443 ip</nowiki>}} | ||
| Line 25: | Line 28: | ||
// means the 80 port service is running | // means the 80 port service is running | ||
</pre> | </pre> | ||
* more on [[Find process running on port]] | |||
=== Is the port opened for external users? === | |||
Check the OS firewall or protected by antivirus software | |||
** {{Linux}} | ** {{Linux}} | ||
*** [http://linux.die.net/man/8/iptables iptables]: (1) {{kbd | key = iptables -L}} to list all rules<ref>[http://wiki.centos.org/HowTos/Network/IPTables HowTos/Network/IPTables - CentOS Wiki]</ref> (2) rule with smaller line-number will override the rule with larger line-number<ref>[https://fedoraproject.org/wiki/How_to_edit_iptables_rules?rd=User_talk:Rforlot How to edit iptables rules - FedoraProject]</ref> | *** [http://linux.die.net/man/8/iptables iptables]: (1) {{kbd | key = iptables -L}} to list all rules<ref>[http://wiki.centos.org/HowTos/Network/IPTables HowTos/Network/IPTables - CentOS Wiki]</ref> (2) rule with smaller line-number will override the rule with larger line-number<ref>[https://fedoraproject.org/wiki/How_to_edit_iptables_rules?rd=User_talk:Rforlot How to edit iptables rules - FedoraProject]</ref> | ||