iptables:test_the_firewall
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
iptables:test_the_firewall [2016/10/19 10:43] – created peter | iptables:test_the_firewall [2019/11/29 17:57] (current) – removed peter | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== IPTables - Test the firewall ====== | ||
- | |||
- | ===== Scan your Target for Open TCP Ports ===== | ||
- | |||
- | Scan our target host for open TCP ports. | ||
- | |||
- | There are actually a few TCP scans that nmap knows how to do. The best one to usually start off with is a SYN scan, also known as a " | ||
- | |||
- | ==== Setting Up the Packet Capture ==== | ||
- | |||
- | Use **tcpdump** to capture the traffic generated by the test. This will be used to analyze the packets sent and received in more depth later on if we need to. Let's create a directory within **~/ | ||
- | |||
- | <code bash> | ||
- | mkdir ~/ | ||
- | </ | ||
- | |||
- | We can start a **tcpdump** capture and write the results to a file in our **~/ | ||
- | |||
- | <code bash> | ||
- | sudo tcpdump host target_ip_addr -w ~/ | ||
- | </ | ||
- | |||
- | By default, **tcpdump** will run in the foreground. | ||
- | |||
- | We can pause the running process by hitting **CTRL-Z**: | ||
- | |||
- | <code bash> | ||
- | CTRL-Z | ||
- | </ | ||
- | |||
- | This will pause the running process: | ||
- | |||
- | Output | ||
- | |||
- | < | ||
- | ^Z | ||
- | [1]+ Stopped | ||
- | </ | ||
- | |||
- | **NOTE**: | ||
- | |||
- | <code bash> | ||
- | bg | ||
- | </ | ||
- | |||
- | You should see a similar line of output, this time without the " | ||
- | |||
- | Output | ||
- | |||
- | < | ||
- | [1]+ sudo tcpdump host target_ip_addr -w ~/ | ||
- | </ | ||
- | |||
- | The command is now running in the background, watching for any packets going between our audit and target machines. | ||
iptables/test_the_firewall.1476873787.txt.gz · Last modified: 2020/07/15 09:30 (external edit)