Posts Tagged ‘cPanel’

April 16, 2013

iptables Tips and Tricks – Track Bandwidth with iptables

By in Development, Tips and Tricks

As I mentioned in my last post about CSF configuration in iptables, I’m working on a follow-up post about integrating CSF into cPanel, but I thought I’d inject a simple iptables use-case for bandwidth tracking. You probably think about iptables in terms of firewalls and security, but it also includes a great diagnostic tool for counting bandwidth for individual rules or set of rules. If you can block it, you can track it!

The best part about using iptables to track bandwidth is that the tracking is enabled by default. To see this feature in action, add the “-v” into the command:

[root@server ~]$ iptables -vnL
Chain INPUT (policy ACCEPT 2495 packets, 104K bytes)

The output includes counters for both the policies and the rules. To track the rules, you can create a new chain for tracking bandwidth:

[root@server ~]$ iptables -N tracking
[root@server ~]$ iptables -vnL
...
Chain tracking (0 references)
 pkts bytes target 	prot opt in 	out 	source           	destination

Then you need to set up new rules to match the traffic that you wish to track. In this scenario, let’s look at inbound http traffic on port 80:

[root@server ~]$ iptables -I INPUT -p tcp --dport 80 -j tracking
[root@server ~]$ iptables -vnL
Chain INPUT (policy ACCEPT 35111 packets, 1490K bytes)
 pkts bytes target 	prot opt in 	out 	source           	destination
    0 	  0 tracking    tcp  --  *  	*   	0.0.0.0/0        	0.0.0.0/0       	tcp dpt:80

Now let’s generate some traffic and check it again:

[root@server ~]$ iptables -vnL
Chain INPUT (policy ACCEPT 35216 packets, 1500K bytes)
 pkts bytes target 	prot opt in 	out 	source           	destination
  101  9013 tracking    tcp  --  *  	*   	0.0.0.0/0        	0.0.0.0/0       	tcp dpt:80

You can see the packet and byte transfer amounts to track the INPUT — traffic to a destination port on your server. If you want track the amount of data that the server is generating, you’d look for OUTPUT from the source port on your server:

See the OUTPUT Command and Learn More about Tracking Bandwidth with iptables »

September 15, 2011

PHIL’s DC: HostingCon

By in Culture, Funny, Technology

HostingCon 2011 in San Diego may have been a huge success for SoftLayer, but I walked away with a different experience following my intense pursuit of building the PHIL’s DC brand. Apparently, the hosting industry wants to see my data center succeed before they believe it, and I think it’s really just fear rearing its ugly head. People are afraid of what they don’t understand, so the uninitiated would probably be terrified as they try to learn what I’m doing.

In an effort to help some of the bigger names in the hosting industry get in on the ground floor of PHIL’s DC, I took a stroll down the HostingCon aisles. Vendors like Parallels and cPanel were obvious choices to discuss business partnerships, and I was sure TheWHIR wanted the scoop on the next big thing in hosting, so I made sure to give them all a chance to speak with me. The documentary film team I hired (the guy I met outside the San Diego Convention Center who said he’d follow me with a camera for $3.50/hour) recorded our interactions for posterity’s sake:

I’d like send shouts out to thank Candice Rodriguez from TheWHIR, Aaron Phillips from cPanel and John McCarrick from Parallels for agreeing to let us film our organic interactions. They’ve further inspired me to build a data center that will make these apparent “snubs” and “rejections” a thing of the past. To Summer and Natalie at the SoftLayer booth: Please stop making fun of my Server Challenge attempt every time you see me at the office … I think I had something in my eye when I was competing, so it wasn’t a fair measure of my skillz.

Oh, and if you didn’t get a chance to attend our “Geeks Gone Wild” party at HostingCon, you’d probably be interested in seeing video from The Dan Band’s performance of “Total Eclipse of the Heart,” cPanel posted it here: http://www.vimeo.com/28160105 (NSFW language, The Dan Band take artistic license with profanity)

-PHIL

September 30, 2009

See You in Houston!

By in News, SoftLayer

Next week a crowd of SoftLayer peeps are making the H-Town connection at cPanel Conference 2009. Representatives from the support, operations, sales, development, and management teams will be out in full force meeting, greeting, and learning. The conference is from Monday Oct 5 to Wednesday Oct 7 at the Hilton Americas Houston Hotel. Stop by our booth if you’d like to chat. We’re throwing a reception for our awesome customers and partners at the lobby bar on Monday at 9pm. If that’s not enough, yours truly will be giving a talk on Tuesday about how to extend cPanel and WHM through a 3rd party API. Y’all get three guesses as to whose API we’re showing off. :) Bring your ripest fruits and vegetables and ready your air horns. It’s been a while since I’ve had a good, old-fashioned heckling.

Come on out if you can make it. We love getting to know the folks who pay our salaries. ;) See you there!