Reputation: 21
I have setup a python server on server machine which is an aws instance and trying to access it using public_IP:80 from client machine which is in different network. It is not able to load the data from the server.
Upvotes: 0
Views: 1193
Reputation: 165
There can be multiple network blockers in this client/server communication.
One of those, which is highly probable is Security-group or NACLs in this AWS based communication.
If you are running your instance in EC2-Classic then you need to check security-group inbound rules for allowing client on port 80 and if it is running in AWS VPC then check the security-group inbound rules as well as Network ACLs for inbound as well as outbound rule.
In Security Group allow
Type Http, Protocol TCP and source IP should your client IP or 0.0.0.0/0 (Less secure).
And in case of NACLs adjust it as below:
INBOUND Rule:
100 HTTP (80) TCP (6) 80 Allow
OUTBOUND Rule:
100 Custom TCP Rule TCP (6) 1024-65535 ALLOW
Ephemeral port range can be adjusted here depending upon OS and distribution.
Apart from these adjustments you need to check if Firewall on client/server is blocking any such communication or not.
Upvotes: 1