How Do I Expose a Port in Linux?
Contents

How do I open a port in Linux?

If you want to open an incoming TCP port, type the following:

  1. iptables -I INPUT -p tcp –dport 12345 –syn -j ACCEPT. If you want to open a UDP port (perhaps for DHT in Tixati), type the following:
  2. iptables -I INPUT -p udp –dport 12345 -j ACCEPT. …
  3. service iptables save.

How do you release a port?

  1. open cmd. type in netstat -a -n -o. find TCP [the IP address]:[port number] …. …
  2. CTRL+ALT+DELETE and choose “start task manager” Click on “Processes” tab. Enable “PID” column by going to: View > Select Columns > Check the box for PID. …
  3. Now you can rerun the server on [the IP address]:[port number] without a problem.

31 дек. 2011 г.

David Miller

David Miller

Executive Financial & Market Analyst

David Miller brings 15 years of experience in global economics, personal finance strategy, and market dynamics. He specializes in turning complex economic trends into actionable insights for everyday readers.

Share this article
Twitter Facebook Pinterest