Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # NetCat & Firewall Stuff
- `netcat` is a program that allows us to send packets one at a time over a network. To set up communication using `netcat`, first start a `netcat` server in a terminal window.
- ```bash
- netcat -l -p 3000
- ```
- I chose to start the server on port `3000`. You can choose any number greater than 1024.
- Next, open a new terminal window and set up the **client**. The client requests messages from the server.
- ```bash
- netcat 127.0.0.1 3000
- ```
- I used the IP address `127.0.0.1` so that I can communicate with the server hosted on on my machine. If you want to communicate with a server on a different machine, you have to put its IP address instead. I also put the port that I want to connect to.
- You can now type into either terminal window, and send the message across to the other window. This will also work to send messages from one computer to another.
- Next, try to **block** the `netcat` client by writing a new firewall rule. Check out `iptables` and the resources posted on Classroom.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement