You are Here: FAQ ->Dedicated Servers->Linux Root Server->Traffic/Bandwidth Usage->Article #1


WebHosting 5.0 This article is for 1&1 Linux WebHosting only.


Where can I check the amount of traffic I have used?


All traffic arriving or leaving your Root-Server with the exception of traffic to
our backup server (if ordered) and our update server will be accounted for and be
billed.

To check the amount of incoming and outgoing traffic since the last reboot of your
Root-Server please do the following through SSH:

Monitor traffic with iptables:
To view the traffic since the last reboot please enter:
p12345678:~ # iptables -L -v | grep Chain
Chain INPUT (policy ACCEPT 533478 packets, 176421581 bytes)
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
Chain OUTPUT (policy ACCEPT 1132268 packets, 1367556267 bytes)

This displays the traffic in the three standard rule-chains
INPUT: all incoming pakets
FORWARD: all forwarded pakets
OUTPUT: all outgoing pakets

You may define rules using ipchains which will monitor traffic to/from certain
machines. The example shows the traffic to and from the backup server being
displayed separately.
p12345678:~ # iptables -A INPUT --source backup01.pureserver.de --jump ACCEPT
p12345678:~ # iptables -A INPUT
p12345678:~ # iptables -A OUTPUT --destination backup01.pureserver.de --jump ACCEPT
p12345678:~ # iptables -A OUTPUT
p12345678:~ # iptables -L -v
Chain INPUT (policy ACCEPT 533478 packets, 176421581 bytes)
pkts bytes target prot opt in out source destination
0 0 ACCEPT all -- any any backup01.pureserver.de anywhere
20 1260 all -- any any anywhere anywhere

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination

Chain OUTPUT (policy ACCEPT 1132268 packets, 1367556267 bytes)
pkts bytes target prot opt in out source destination
0 0 ACCEPT all -- any any anywhere backup01.pureserver.de
39 2944 all -- any any anywhere anywhere

As you can see here a rule which was generated a few seconds ago obviously only
reflects the traffic incurred since the rule was created.

It will very much be worth your while to get yourself familiarized with iptables,
as these commands are also used for building a Packet Filtering Firewall.

SD2B2C602


Print Article
How useful was this article?
(From 5 = Very Useful to 1 = Not useful at all):
1 2 3 4 5