InfoHeap
Tech tutorials, tips, tools and more
Navigation
  • Home
  • Tutorials
    • CSS tutorials & examples
    • CSS properties
    • Javascript cookbook
    • Linux/Unix Command Line
    • Mac
    • PHP
      • PHP functions online
      • PHP regex
    • WordPress
  • Online Tools
    • Text utilities
    • Online Lint Tools
search

Networking tutorials

  • DIG quick start tutorial
  • Dig - list all dns records
  • How to view wifi connection speed on Mac
  • Linux iptables - Nat port forwarding using PREROUTING
  • Linux iptables and ip6tables examples
  • Ngrep - quick start guide
  • Use nc to check if a remote port is reachable
  • Use nc to listen to tcp or udp port
  • Use nc to test HTTP url redirection
  • add more DNS servers to Wi-Fi interface on Mac
  • locally override website host to IP mapping
  • use nc to print headers from browser
 
  • Home
  • > Tutorials
  • > Networking

Use netcat (nc) to listen on tcp or udp port

on Sep 23, 2016

Netcat (nc) can be use as a mini server which can listen to either tcp or udp port on Mac or Linux.

nc – listen on a tcp port

Use sudo in case port is privileged (less than 1024).

$ nc -l 8080

nc – listen on a udp port

Use sudo in case port is privileged (less than 1024).

$ nc -u -l 8080

Suggested posts:

  1. Linux iptables and ip6tables examples
  2. Centos – save and restore iptables
  3. Use netcat (nc) to check if a remote port is reachable
  4. how to use netcat (nc) to test HTTP url redirection
  5. How to use nc (netcat) to print headers sent by a browser
  6. How to use ssh port forwarding to surf a site from different location
  7. Linux iptables – Nat port forwarding using PREROUTING
  8. How to connect to mysql server using ssh port forwarding
Share this article: share on facebook share on linkedin tweet this submit to reddit
Posted in Tutorials | Tagged Networking, Tutorials, Webmaster
  • Browse content
  • Article Topics
  • Article archives
  • Contact Us
Popular Topics: Android Development | AngularJS | Apache | AWS and EC2 | Bash shell scripting | Chrome developer tools | CSS | CSS cookbook | CSS properties | CSS Pseudo Classes | CSS selectors | CSS3 | CSS3 flexbox | Devops | Git | HTML | HTML5 | Java | Javascript | Javascript cookbook | Javascript DOM | jQuery | Kubernetes | Linux | Linux/Unix Command Line | Mac | Mac Command Line | Mysql | Networking | Node.js | Online Tools | PHP | PHP cookbook | PHP Regex | Python | Python array | Python cookbook | SEO | Site Performance | SSH | Ubuntu Linux | Web Development | Webmaster | Wordpress | Wordpress customization | Wordpress How To | Wordpress Mysql Queries

Copyright © 2023 InfoHeap.

Powered by WordPress