|
|
|
|
|
|
Re: IRC [message #16013 is a reply to message #15994] |
Sat, 18 August 2007 19:20 |
zwtint
Messages: 17 Registered: November 2006
|
Junior Member |
|
|
Okey, I try it.
I already made a rule to block 6667 port out and incoming but its not works.
Other, Can I limit the bandwidth of VPS per gigabyte?
Not by speed!
Regards,
[Updated on: Sat, 18 August 2007 19:20] Report message to a moderator
|
|
|
|
Re: IRC [message #16026 is a reply to message #16019] |
Sat, 18 August 2007 21:42 |
locutius
Messages: 125 Registered: August 2007
|
Senior Member |
|
|
iptables is a bitch because all the time you must keep a clear record of your rulez and for any configuration worthy of a modern webserver the rulez get long and complex to read
as a basic requirement for any server facing the cloud i recommend advanced policy firewall http://rfxnetworks.com/apf.php it is a simple to use intuitive script for loading rules into iptables
in addition to dynamic rules there are static global rules which can be used to loaded blocklists into iptables. i have servers blocking 2.6 million IPs or 64% of the net in the kernel at very very very small cost (5% cpu)
you can easily obtain lists of IRC networks and other nasty stuff. ipfiltering those bad guys will make your server most unattractive to anyone who needs a server to run evil IRC
btw your hosts attempts are ridiculous, slap him
EDIT:
to be clear, there is nothing wrong with local irc as a service. it is everything and the evil that comes with irc you dont want. my best guess is what you want is to remove the possibility the VPS are used to join evil undernet etc and if eggdrops are installed then they are limited. the above iptables solution will do that for you and more. NOTE: enable egress filtering
[Updated on: Sat, 18 August 2007 21:57] Report message to a moderator
|
|
|
|
|
Re: IRC [message #16033 is a reply to message #15994] |
Sun, 19 August 2007 16:42 |
zwtint
Messages: 17 Registered: November 2006
|
Junior Member |
|
|
Okey, then I dont understand:S
# the IP block allocated to this server
SEGMENT="192.168.0.0/24"
# the IP used by the hosting server itself
THISHOST="192.168.0.1"
# services that should be allowed to the HN; services for VEs are configured in /etc/firewall.d/*
OKPORTS="53"
# hosts allowed full access through the firewall, to all VEs and to this server
DMZS="12.34.56.78 90.123.45.67"
Its ok, what is OKPORTS? it should be allowed everything except IRC access, so what should I write there?
next:
# This file is processed by /etc/init.d/firewall
VEID="1" # the VE's ID#
VENAME="Customer1" # A human-friendly label for the VE
VEIP="192.168.1.34" # the IP address for this VE
OPENPORTS="80 443" # ports that should be universally opened to the entire Internet
DMZS="1.2.3.0/24 5.6.7.8/32" # IPs and blocks that should have full access to the VE's services
BANNED="" # IPs and blocks that should be entirely blocked from the VE's services
Okey, so what is VEID? should I add like 01,02,03 etc.. or should I create such file for every VPS? or can I do it globally?
OPENPORTS: as I said, everything is open except IRC access, what should I write there?
DMZS: I dont understand again, every ip is allowed
BANNED: what? every ip is allowed
Then I dont know where should I put IRC ports and what ports should I put there.
Sorry if Im too lame:(
A.
|
|
|
Re: IRC [message #16034 is a reply to message #16033] |
Sun, 19 August 2007 17:05 |
|
dowdle
Messages: 261 Registered: December 2005 Location: Bozeman, Montana
|
Senior Member |
|
|
zwtint wrote on Sun, 19 August 2007 10:42 | what is OKPORTS? it should be allowed everything except IRC access, so what should I write there?
|
No, rather than allowing everything but some ports... this firewall denies everything but the ports you specify.
A VEID is your Virtual Environment Identifier... or the number of your VPS.
Quote: | should I create such file for every VPS? or can I do it globally?
|
You create a separate file for each VPS... that way you can have different firewall rules (allowing the needed services) for each VPS.
Quote: | OPENPORTS: as I said, everything is open except IRC access, what should I write there?
|
Again, it is a deny everything except for what is allowed type of firewall.
Quote: | DMZS: I dont understand again, every ip is allowed
|
That is so you can specify IPs or ranges of IPs where your firewall doesn't block them.
Quote: | BANNED: what? every ip is allowed
|
This is if you want to ban an IP or range of IPs from all services even those you have allowed.
Quote: | Sorry if Im too lame:(
|
Just try it... and play with it... and hopefully it'll make more sense to you. I'm not sure why I have to explain all of this to you... because I thought most of it was explained on the wiki page.
--
TYL, Scott Dowdle
Belgrade, Montana, USA
|
|
|
|
Re: IRC [message #16036 is a reply to message #16035] |
Sun, 19 August 2007 18:31 |
|
dowdle
Messages: 261 Registered: December 2005 Location: Bozeman, Montana
|
Senior Member |
|
|
There are two basic ports settings:
1) Ports you define for the host node in the firewall script
2) Ports you define for the VPSes in the /etc/firewall.d/ files you create.
So, you are creating a firewall for the host node... and it can have what ports you want it to have open... AND you are creating separate firewalls for each VPS... and they can have just the ports you want them to have open.
So, if you enable port 22 on the hn, that only affects the host node. If you enable port 80 in a VPS, it only affects that VPS.
Getting back to your question, yes... the ports you allow through are the only ones that traffic will be allowed through on... so while a VPS user might bind a program/service to a particular port, unless it is allowed in the VPS' /etc/firewall.d/ file, it'll get dropped before the VPS ever sees it.
--
TYL, Scott Dowdle
Belgrade, Montana, USA
|
|
|
Re: IRC [message #16037 is a reply to message #15994] |
Sun, 19 August 2007 18:34 |
zwtint
Messages: 17 Registered: November 2006
|
Junior Member |
|
|
Then its a very bad solution cause vps means costumer has root access and can do whatever he wants.
So he must always email me or anything to open ports for him
Any other idea?
[Updated on: Sun, 19 August 2007 18:35] Report message to a moderator
|
|
|
Re: IRC [message #16038 is a reply to message #15994] |
Sun, 19 August 2007 19:28 |
zwtint
Messages: 17 Registered: November 2006
|
Junior Member |
|
|
This topic can be closed as solved!
The correct iptables rule:
/sbin/iptables -D FORWARD -p tcp --dport 6660:6669 -j DROP
which close the most popular ports!
A.
[Updated on: Sun, 19 August 2007 19:28] Report message to a moderator
|
|
|
|
|
|
|