Software Antivirus Movie Review Blogger Trick News Internet Tips

Keluarga Besar 3langitbiru Mengucapkan Selamat Natal dan Tahun Baru 2012

How to create a firewall rule for bandwidth monitoring with iptables - Blogger Tricks

Share on :
Blogger Tricks - Once the network has worked perfectly, the next step is to create a firewall rule to allow us to monitor statistics or total internet bandwidth usage by the local network based on service

The first step in making a firewall rule is to create a new chain with the name "DOWNLOAD" and "UPLOAD" as follows:

# Iptables - N DOWNLOAD

# Iptables - N UPLOAD

# Iptables - nL

After defining the new chain, further defining the next rule FORWARD firewall to classify traffic into traffic UPLOAD and DOWNLOAD. Steps were as follows:

# Iptables-A FORWARD-s eth0-j UPLOAD

# Iptables-A FORWARD-d eth0-j DOWNLOAD

Next create a firewall rule-rule to match traffic UPLOAD and DOWNLOAD to service HTTP, SMTP, POP3, DNS, and SSH, as follows:

# Iptables-A UPLOAD-p tcp-s 80

# Iptables-A UPLOAD-p tcp-s 25

# Iptables-A UPLOAD-p tcp-s 110

# Iptables-A UPLOAD-p tcp-s 53

# Iptables-A UPLOAD-p udp-s 53

# Iptables-A UPLOAD-p tcp-s 22

# Iptables-A DOWNLOAD-p tcp-d 80

# Iptables-A DOWNLOAD-p tcp-d 25

# Iptables-A DOWNLOAD-p tcp-d 110

# Iptables-A DOWNLOAD-p tcp-d 53

# Iptables-A DOWNLOAD-p udp-d 53

# Iptables-A DOWNLOAD-p tcp-d 22

Having created the firewall rule rule do not forget to save the existing rule by running the following command:

# Service iptables save

For the Linux distribution Ubuntu the command as follows:

# Iptables-save> / etc / myiptables.cfg

See the upload and download bandwidth usage Finished configuration, then we can do bandwidth monitoring. To see the total upload and download bandwidth command as follows:

# Iptables - nL FORWARD - v

To view details of download bandwidth each service command as follows:

# Iptables - nL DOWNLOAD - v

To view the details of the upload bandwidth of each service command as follows:

# Iptables - nL UPLOAD - v


0 komentar on How to create a firewall rule for bandwidth monitoring with iptables - Blogger Tricks :

Post a Comment and Don't Spam!

Related Posts Plugin for WordPress, Blogger...