open a port that can be accessed or ping from outside

Hi I want to open a port 11443 that should ping from outside for example i have IP address 192.168.1.1:11443 it should respond. Please help me with steps how to do that I have tried ufw but it's doesn't seems working

4 Replies

Hello! We have a guide on UFW that may help:

How to Configure a Firewall with UFW

Alternatively, you could disable UFW and use iptables instead:

ufw disable

We have a guide on iptables here:

Controlling Network Traffic with iptables

hi when i run command sudo iptables -l it shows me the output below :
root@localhost:~# sudo iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere ctstate RELATED,ESTABLISHED
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT tcp -- anywhere anywhere tcp dpt:11443
ACCEPT udp -- anywhere anywhere udp dpt:11443
ACCEPT tcp -- anywhere anywhere tcp dpt:11443
ACCEPT tcp -- 27.58.79.252 192.168.1.254 tcp dpt:https
ACCEPT tcp -- 27.58.79.252 192.168.1.254 tcp dpt:11443

Am i at the right place ? if yes then still I am not able to access the port from outside like telnet why ?

sometime it shows open after sometime it shows closed !

iptables(8) rules are not persistent unless you do that yourself. If you reboot your system, all the rules you create will be gone once the system is running again.

There used to be a simple way to accomplish persistence but with the advent of systemd(1) and NetworkManager(8), this seems to have gone away. I'm sure you could write a script and a systemd(1) component to do this. Not sure about NetworkManager(8)

-- sw

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct