Sometimes it is handy to check firewall rules without coordinating a test with the end user. For these tests, use the hping2 utility to "spoof" traffic coming from the source IP address(es) used in the firewall rules.
At the same time, monitor the internal and external network interfaces on the firewall to make sure traffic is reaching the firewall and allowed through the firewall. In order to do this, you must have root access on the firewall and on the machine running hping2.
Example firewall rule:
Permit source IP 192.168.1.1 to communicate with destination IP 10.0.0.1 over TCP port 1000.
To test the rule, issue the following hping2 command:
hping2 -a 192.168.1.1 10.0.0.1 -p 1000
At the same time, log into the firewall and run the following commands (example with internal network interface etho and external network interface eth1)
In window 1:
tcpdump -i eth0 host 192.168.1.1 and port 1000
In window 2:
tcpdump -i eth1 host 10.0.0.1 and port 1000
If you do not see any output in window 1, traffic is not reaching the firewall. A choke router or other packet-filtering device may not be allowing the traffic to reach the firewall.
If you see output in window 1 but not in window 2, traffic is not being allowed through the firewall. Check the firewall rulebase for any errors.
Monday, March 24, 2008
Testing firewall rules
Subscribe to:
Post Comments (Atom)
Linuxpoison Archive
-
▼
2009
(159)
-
▼
July
(10)
- Getting System Information (OpenSuSe) - phpSysInfo...
- Squid Authentication using RADIUS
- SQL client and front-end for multiple database- cr...
- Limit the CPU usage of an application (process) - ...
- Windows "Screen Of Death" now on Linux (GDM Theme)...
- Improving filesystem read performance using "noati...
- Auto reboot after kernel panic
- How do Flush DNS Cache in Linux
- Multi-protocol, Multi-source, Fast and Reliable Do...
- Query Apache logfiles via SQL
-
►
June
(28)
- Mac4lin - Give that Mac OS X look to Linux
- Complete and Reliable Password Manager for OpenSuS...
- Hiding secret data into image and audio files (Ope...
- Archiving, Encryption and File split tool - PeaZip...
- DenyHosts Installation and Configuration on OpenSu...
- How to calculates CRC checksum and the byte count ...
- Block ssh brute force attack on OpenSuSe
- Searching files using catfish - OpenSuSe
- History of Unix-like operating systems showing Lin...
- Kool Ubuntu GDM Themes
- KDE desktop Blogging Client - KBlogger
- Twitter client for KDE 4.2 - KDEtwitter
- Microblogging client for Twitter, Jaiku, Facebook,...
- Front-end for the ClamAV antivirus toolkit - klama...
- How to disable loading of unnecessary kernel modul...
- Increase the booting speed of Fedora
- How to Edit PDF Files in Linux - PDFEdit
- Multimedia Support in Fedora 11
- How to Cut/Split Video using Avidemux
- Create Ubuntu packages (deb)
- Install MS True Type Fonts in Fedora
- Increasing Bugzilla attachment size & saving large...
- Squid Error : Name error: the domain name does not...
- How to list Open Files and Network Connections
- Linux Market Share Passes 2%
- Setting the SUID/SGID bits
- OpenSUSE 11.1: Documentations
- Secure alternative to telnet
-
►
May
(20)
- Philosophy of free software (Video) by Richard Sta...
- Reducing load on web server by using reverse proxy...
- Next Generation of the Fastest P2P Program - Frost...
- (R)ecovery (I)s (P)ossible Linux rescue system
- Download/Upload files from torrents/Rapidshare or ...
- Fighting Spam mails
- How to set Cron/At Access Control
- How to set Access/Restrictions on users logins
- How to allow access to the mail server by individu...
- Create Screencasts on OpenSuSe with recordMyDeskto...
- Transferring audio/video to iPod on OpenSuSe
- Deluge BitTorrent client - OpenSuSe
-
▼
July
(10)








0 comments:
Post a Comment