'Opening port 19132 on an Oracle compute instance (ubuntu-20.04)
I've created an Oracle Cloud infrastructure compute instance running Ubuntu 20.04. I am trying to open port 19132.
As per another question I found Opening port 80 on Oracle Cloud Infrastructure Compute node
I've created a public subnet which has an internet gateway and added ingress rules for port 19132 (in the security lists)
netstat looks good
netstat -tulpn
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
udp 0 0 0.0.0.0:19132 0.0.0.0:* 1007/./bedrock_serv
I installed ufw and added rules to allow 19132 but I still can't connect to it from the outside world. Can anyone point out where I am going wrong?
Solution 1:[1]
I got the same issue on the Oracle cloud.
Here is what works for me; First, install firewalld
sudo apt install firewalld
Then open the port in public zone;
sudo firewall-cmd --zone=public --permanent --add-port=19132/tcp
Finally, reload firewalld
sudo firewall-cmd --reload
Solution 2:[2]
Looks like you need to have a Public IP configured on that VM for it to be reachable from the internet.
Please look at https://docs.cloud.oracle.com/en-us/iaas/Content/Network/Tasks/managingpublicIPs.htm
For an instance to communicate directly with the internet, all of the following are required:
The instance must be in a public subnet. The instance must have a public IP address. The instance's VCN must have an internet gateway. The public subnet must have route tables and security lists configured accordingly.
Solution 3:[3]
You haven't mentioned anything about the route table. If missing add to it a route with destination=0.0.0.0/0 and target=the Internet Gateway.
Solution 4:[4]
Two questions come to mind:
- You have specified two rules, one for TCP and one for UDP. Your netstat shows that something is listening for UDP traffic. Is there also something listening on TCP or are you using UDP only for the test?
- Can you tell us anything about the traffic characteristics on this port? I'm asking because if it is UDP traffic the only way for connection tracking to work is to track the source/dest IP and port. Since the port will not be present in fragments, the traffic will be dropped. This could be happening on the ingress or egress side. To verify, you could create test ingress/egress rules for all UDP traffic to/from your test IP.
Since your ingress rules are stateful, the egress rules shouldn't matter but it wouldn't hurt to double check them. If none of these things work, you might try a tool like echoping to get more insight into whether or not the traffic is having trouble on the ingress or egress side.
Solution 5:[5]
Please check the order of your IPtables rules. Could you post the following command's output for Input chain.
sudo iptables -S INPUT
I have seen Iptables rules as the single prominent reason for these issues.
Regards Muthu
Solution 6:[6]
I think you have to allow user or add user who can connect like this:
create user 'user'@'publicIP' identified by 'password';
grant all privileges on *.* to 'user'@'publicIP' with grant option;
flush privileges;
Here publicIP can be '0.0.0.0' or your system IP address.
Don't use '0.0.0.0' as it is open to all, I have faced various breaches on my GCP machine which leads to account block.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | |
Solution 2 | harsha girish |
Solution 3 | Dimitri Manca |
Solution 4 | sbaker |
Solution 5 | bmuthuv |
Solution 6 | Bramhesh Srivastava |