LxCenter HyperVM & Kloxo Support

Forum



Members   Search      Help    Register    Login    Home
Home » Development Forums » Kloxo Development » iptables rules that need testing
iptables rules that need testing [message #90290] Mon, 24 October 2011 14:03 Go to next message
shazar is currently offline shazar  United States
Messages: 1856
Registered: May 2011
Grandmaster
LxCenter Core Team Member
LxCenter Representative
Please test these rules and let me know what you think. I could probably be a little more tight on the output, but let's see what you think of this first. If this is well received, we can look into including it as an option in a future release along with the ability to add custom ports. I could write it a bit more generic to allow an easy migration from an RHEL base in the future.

The following configration allows you to set iptables to only input port 21 and it takes care of everything else. Do not add ip_conntrack_netbios_ns. This may or may not be in your configuration. If it is there, leave it. If it isn't there, do not add it.

edit /etc/sysconfig/iptables-config
replace IPTABLES_MODULES="ip_conntrack_netbios_ns" with IPTABLES_MODULES="ip_conntrack_netbios_ns ip_conntrack_ftp"

#!/bin/sh
#Restart to load ip_conntrack_ftp module
/etc/init.d/iptables restart
#Clear rules and chains
iptables -F
iptables -X
#allow all input to loopback
iptables -A INPUT -i lo -j ACCEPT
#As an example without the next line wget cannot connect and download
iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
#Allow ping, this could be narrowed to specific icmp types
iptables -A INPUT -p icmp -j ACCEPT
#allow ftp ssh smtp dns http pop3 imap https imaps pop3s kloxohttps kloxohttp
iptables -A INPUT -p tcp --dport 21 -j ACCEPT
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
iptables -A INPUT -p tcp --dport 25 -j ACCEPT
iptables -A INPUT -p tcp --dport 53 -j ACCEPT
iptables -A INPUT -p udp --dport 53 -j ACCEPT
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
iptables -A INPUT -p tcp --dport 110 -j ACCEPT
iptables -A INPUT -p tcp --dport 143 -j ACCEPT
iptables -A INPUT -p tcp --dport 443 -j ACCEPT
iptables -A INPUT -p tcp --dport 993 -j ACCEPT
iptables -A INPUT -p tcp --dport 995 -j ACCEPT
iptables -A INPUT -p tcp --dport 7777 -j ACCEPT
iptables -A INPUT -p tcp --dport 7778 -j ACCEPT
#do not allow traffic that isn't specifically allowed
iptables -P INPUT DROP
#do not forward traffic that isn't specified
iptables -P FORWARD DROP
#allow outgoing traffic.
iptables -P OUTPUT ACCEPT
#save the rules so they are not lost on a restart
/etc/init.d/iptables save


https://www.mercuryvps.com
HyperVM Xen VPS hosting

[Updated on: Tue, 14 February 2012 09:05]

Report message to a moderator

Re: iptables rules that need testing [message #90296 is a reply to message #90290] Mon, 24 October 2011 16:24 Go to previous messageGo to next message
mustafaramadhan is currently online mustafaramadhan  Indonesia
Messages: 5729
Registered: December 2010
Location: Yogyakarta
Super Grandmaster
Forum Moderator

No all email ports?.

IMAP is port 143
IMAP-SSL is port 993
POP is port 110
POP-SSL is port 995

SMTP and SMTP-SSL is on ports 25, 587 and 465. Port 587 has to be SSL, and port 465 is enforced TLS-wrapped and is generally used by Outlook users.


http://download.lxcenter.org/kdev.png
..:: MRatWork ::..
Server/Web-integrator - perfect not always more useful

--- Need KVM/OpenVZ VPS? - click here (Kloxo-MR READY!) ---

For bug/feature/security - Member rank status

http://download.lxcenter.org/hdev.png
Re: iptables rules that need testing [message #90297 is a reply to message #90296] Mon, 24 October 2011 16:30 Go to previous messageGo to next message
mustafaramadhan is currently online mustafaramadhan  Indonesia
Messages: 5729
Registered: December 2010
Location: Yogyakarta
Super Grandmaster
Forum Moderator

Please consider http://www.chebucto.ns.ca/~rakerman/port-table.html

http://download.lxcenter.org/kdev.png
..:: MRatWork ::..
Server/Web-integrator - perfect not always more useful

--- Need KVM/OpenVZ VPS? - click here (Kloxo-MR READY!) ---

For bug/feature/security - Member rank status

http://download.lxcenter.org/hdev.png
Re: iptables rules that need testing [message #90298 is a reply to message #90297] Mon, 24 October 2011 16:34 Go to previous messageGo to next message
shazar is currently offline shazar  United States
Messages: 1856
Registered: May 2011
Grandmaster
LxCenter Core Team Member
LxCenter Representative
Thanks I updated it with pop3s and imaps. I will have to investigate the SMTP further, as with my setup where I only allow the secure pop3s and imaps, I don't allow those ports your specified and Outlook connected fine. I think it gets handled by this rule: iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
Also I don't think those ports you listed are shown with netstat -a which also makes me think they are not actively listening.


https://www.mercuryvps.com
HyperVM Xen VPS hosting
Re: iptables rules that need testing [message #90302 is a reply to message #90298] Mon, 24 October 2011 19:03 Go to previous messageGo to next message
shazar is currently offline shazar  United States
Messages: 1856
Registered: May 2011
Grandmaster
LxCenter Core Team Member
LxCenter Representative
It works fine for me as posted. If you could test it out like that, I'd appreciate it.

https://www.mercuryvps.com
HyperVM Xen VPS hosting
Re: iptables rules that need testing [message #90327 is a reply to message #90302] Tue, 25 October 2011 09:34 Go to previous messageGo to next message
lupetalo is currently offline lupetalo  Serbia
Messages: 253
Registered: April 2011
Senior Member
What is wrong with this http://wiki.lxcenter.org/How+to+secure+your+Kloxo+with+IPTAB LES
it is working fine in production and its easy to understand and configure... Why is your script better?
Re: iptables rules that need testing [message #90329 is a reply to message #90327] Tue, 25 October 2011 10:15 Go to previous messageGo to next message
shazar is currently offline shazar  United States
Messages: 1856
Registered: May 2011
Grandmaster
LxCenter Core Team Member
LxCenter Representative
That is not the proper way to implement iptables in an RHEL. It wouldn't be the proper way in Debian either.
The FTP is not correctly done.
It does not have the IMAPS and POP3S ports open.

I am trying to come up with a proper and secure way. For instance allowing port 20 in the example you referenced, would allow an executable to listen on port 20 since 20 is not actively being used by FTP. In the script I propose here, the proper ftp module takes care of this and only port 21 needs to be allowed in.


https://www.mercuryvps.com
HyperVM Xen VPS hosting
Re: iptables rules that need testing [message #90337 is a reply to message #90329] Tue, 25 October 2011 12:13 Go to previous messageGo to next message
fatbear is currently offline fatbear  United States
Messages: 36
Registered: August 2010
Location: Raleigh, NC
Member
LxCenter Staff
I have found homelansecurity to be good iptables software. It's easy to understand and to change. I would be interested in moving in a direction like this. While they have a 2.0 version, I'm happier with their older 1.7 software. To download, visit:

http://kloxo.org/downloads/homeLANsecurity-1.7.0.tar.gz


What do you think?


Steve Amerige, Fat Bear Incorporated
Server Leasing | Web Engineering | Graphic Design
Managed Services, Website, Java, and Source-Code Hosting

[Updated on: Tue, 25 October 2011 12:14]

Report message to a moderator

Re: iptables rules that need testing [message #90343 is a reply to message #90337] Tue, 25 October 2011 12:55 Go to previous messageGo to next message
shazar is currently offline shazar  United States
Messages: 1856
Registered: May 2011
Grandmaster
LxCenter Core Team Member
LxCenter Representative
I think this could be a fine solution on an individual basis. I am just looking to provide Kloxo with some default security. By default MySQL is wide open for attacks. Then people try many different ways to put up a firewall without knowing exactly what is going on. As you can see from lupetalo's reply, he took that wiki page as gospel without trying to put the screws to it.

https://www.mercuryvps.com
HyperVM Xen VPS hosting
Re: iptables rules that need testing [message #90349 is a reply to message #90343] Tue, 25 October 2011 13:19 Go to previous messageGo to next message
Walter  Brazil
Messages: 866
Registered: February 2009
Location: Florianopolis / BR
Senior Master
Forum Moderator
LxCenter Project Manager

You are forgetting FTP passive ports.

Re: iptables rules that need testing [message #90353 is a reply to message #90349] Tue, 25 October 2011 13:34 Go to previous messageGo to next message
shazar is currently offline shazar  United States
Messages: 1856
Registered: May 2011
Grandmaster
LxCenter Core Team Member
LxCenter Representative
Walter - How can I test the passive ports? FTP works fine for me. I think the FTP module that is loaded handles that. Maybe I can choose passive mode in my client. I will test at home and let you know.

https://www.mercuryvps.com
HyperVM Xen VPS hosting
Re: iptables rules that need testing [message #90368 is a reply to message #90343] Tue, 25 October 2011 18:04 Go to previous messageGo to next message
lupetalo is currently offline lupetalo  Serbia
Messages: 253
Registered: April 2011
Senior Member
shazar wrote on Tue, 25 October 2011 12:55
I think this could be a fine solution on an individual basis. I am just looking to provide Kloxo with some default security. By default MySQL is wide open for attacks. Then people try many different ways to put up a firewall without knowing exactly what is going on. As you can see from lupetalo's reply, he took that wiki page as gospel without trying to put the screws to it.


I took that as a guide not as gospel (whatever that means)...
Re: iptables rules that need testing [message #90369 is a reply to message #90368] Tue, 25 October 2011 18:12 Go to previous messageGo to next message
shazar is currently offline shazar  United States
Messages: 1856
Registered: May 2011
Grandmaster
LxCenter Core Team Member
LxCenter Representative
No offense, it is just I am doing further research on it and found some flaw in it. This is what development is all about.

Walter - My client actually defaults to passive mode:

Response: 227 Entering Passive Mode

I don't know what I can test further to show it is indeed passive.

*EDIT - It works in active mode as well.


https://www.mercuryvps.com
HyperVM Xen VPS hosting

[Updated on: Tue, 25 October 2011 18:18]

Report message to a moderator

Re: iptables rules that need testing [message #90370 is a reply to message #90369] Tue, 25 October 2011 18:56 Go to previous messageGo to next message
mustafaramadhan is currently online mustafaramadhan  Indonesia
Messages: 5729
Registered: December 2010
Location: Yogyakarta
Super Grandmaster
Forum Moderator

Not include 7779 (kloxo slave port)?. Also not include ports for hypervm?

http://download.lxcenter.org/kdev.png
..:: MRatWork ::..
Server/Web-integrator - perfect not always more useful

--- Need KVM/OpenVZ VPS? - click here (Kloxo-MR READY!) ---

For bug/feature/security - Member rank status

http://download.lxcenter.org/hdev.png
Re: iptables rules that need testing [message #90375 is a reply to message #90370] Tue, 25 October 2011 21:42 Go to previous messageGo to next message
shazar is currently offline shazar  United States
Messages: 1856
Registered: May 2011
Grandmaster
LxCenter Core Team Member
LxCenter Representative
This is just for Kloxo so I wouldn't add HyperVM ports in it and I've not tested a slave setting yet. That is easy enough to add though. I'd like to get past FTP first to make sure that we all agree.

https://www.mercuryvps.com
HyperVM Xen VPS hosting
Re: iptables rules that need testing [message #92834 is a reply to message #90290] Tue, 20 December 2011 19:53 Go to previous messageGo to next message
slcker76
Messages: 1
Registered: December 2011
Location: United States
Member
When running the script get the error

iptables v1.3.5: Can't use -X with -F

so the work around for this is

iptables -F
iptables -X

#!/bin/sh
#Restart to load ip_conntrack_ftp module
/etc/init.d/iptables restart
#Clear rules and chains
iptables -F
iptables -X
#allow all input to loopback
iptables -A INPUT -i lo -j ACCEPT
#As an example without the next line wget cannot connect and download
iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
#Allow ping, this could be narrowed to specific icmp types
iptables -A INPUT -p icmp -j ACCEPT
#allow ftp ssh smtp dns http pop3 imap https imaps pop3s kloxohttps kloxohttp
iptables -A INPUT -p tcp --dport 21 -j ACCEPT
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
iptables -A INPUT -p tcp --dport 25 -j ACCEPT
iptables -A INPUT -p tcp --dport 53 -j ACCEPT
iptables -A INPUT -p udp --dport 53 -j ACCEPT
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
iptables -A INPUT -p tcp --dport 110 -j ACCEPT
iptables -A INPUT -p tcp --dport 143 -j ACCEPT
iptables -A INPUT -p tcp --dport 443 -j ACCEPT
iptables -A INPUT -p tcp --dport 993 -j ACCEPT
iptables -A INPUT -p tcp --dport 995 -j ACCEPT
iptables -A INPUT -p tcp --dport 7777 -j ACCEPT
iptables -A INPUT -p tcp --dport 7778 -j ACCEPT
#do not allow traffic that isn't specifically allowed
iptables -P INPUT DROP
#do not forward traffic that isn't specified
iptables -P FORWARD DROP
#allow outgoing traffic.
iptables -P OUTPUT ACCEPT
#save the rules so they are not lost on a restart
/etc/init.d/iptables save
Re: iptables rules that need testing [message #93231 is a reply to message #92834] Wed, 28 December 2011 09:51 Go to previous messageGo to next message
shazar is currently offline shazar  United States
Messages: 1856
Registered: May 2011
Grandmaster
LxCenter Core Team Member
LxCenter Representative
slcker76 - Did you ever get the ftp module to work properly on your system. I had no trouble as it just worked, but per our discussion in IRC, the module didn't exist or something.

https://www.mercuryvps.com
HyperVM Xen VPS hosting
Re: iptables rules that need testing [message #93794 is a reply to message #93231] Sat, 07 January 2012 18:16 Go to previous messageGo to next message
wf6490 is currently offline wf6490  United Kingdom
Messages: 44
Registered: January 2012
Location: UK
Member

this is my readout is this right:
Quote:
Flushing firewall rules: [ OK ]
Setting chains to policy ACCEPT: filter [ OK ]
Unloading iptables modules: [ OK ]
Applying iptables firewall rules: [ OK ]
Loading additional iptables modules: ip_conntrack_netbios_n[ OK ]ntrack_ftp
iptables v1.3.5: Can't use -X with -F

Try `iptables -h' or 'iptables --help' for more information.
./firewall: line 13: kloxohttp: command not found
Saving firewall rules to /etc/sysconfig/iptables: [ OK ]
[root@s1 ~]#
Re: iptables rules that need testing [message #93795 is a reply to message #93794] Sat, 07 January 2012 18:21 Go to previous messageGo to next message
wf6490 is currently offline wf6490  United Kingdom
Messages: 44
Registered: January 2012
Location: UK
Member

shall i re run it with slcker76's change?
Re: iptables rules that need testing [message #93796 is a reply to message #93795] Sat, 07 January 2012 18:26 Go to previous messageGo to next message
wf6490 is currently offline wf6490  United Kingdom
Messages: 44
Registered: January 2012
Location: UK
Member

ok readout from slcker76's change
Flushing firewall rules:                                   [  OK  ]
Setting chains to policy ACCEPT: filter                    [  OK  ]
Unloading iptables modules:                                [  OK  ]
Applying iptables firewall rules:                          [  OK  ]
Loading additional iptables modules: ip_conntrack_netbios_n[  OK  ]ntrack_ftp
Saving firewall rules to /etc/sysconfig/iptables:          [  OK  ]
[root@s1 ~]#


p.s: ive added port 10000 for webmin, i only tend to use it for file searching etc but it is quite usefull

p.p.s: FTP works fine

[Updated on: Sat, 07 January 2012 18:42]

Report message to a moderator

Re: iptables rules that need testing [message #93805 is a reply to message #93796] Sat, 07 January 2012 23:15 Go to previous messageGo to next message
shazar is currently offline shazar  United States
Messages: 1856
Registered: May 2011
Grandmaster
LxCenter Core Team Member
LxCenter Representative
Thanks. I've updated the post to separate the F and X.

https://www.mercuryvps.com
HyperVM Xen VPS hosting

[Updated on: Sat, 07 January 2012 23:15]

Report message to a moderator

Re: iptables rules that need testing [message #95055 is a reply to message #93805] Tue, 14 February 2012 09:06 Go to previous messageGo to next message
shazar is currently offline shazar  United States
Messages: 1856
Registered: May 2011
Grandmaster
LxCenter Core Team Member
LxCenter Representative
I've updated this with a note on ip_conntrack_netbios_ns.

Also making this a sticky to get more feedback on this.


https://www.mercuryvps.com
HyperVM Xen VPS hosting
Re: iptables rules that need testing [message #95116 is a reply to message #95055] Thu, 16 February 2012 19:14 Go to previous messageGo to next message
LxCenter_Danny is currently offline LxCenter_Danny  Netherlands
Messages: 2073
Registered: July 2007
Location: Netherlands
Grandmaster
LxCenter Core Team Member
LxCenter Representative

You do miss 3306 MySQL port when Users do remotely MySQL sessions if allowed/set.




LxCenter - System Operations
Re: iptables rules that need testing [message #95117 is a reply to message #95116] Thu, 16 February 2012 19:17 Go to previous messageGo to next message
LxCenter_Danny is currently offline LxCenter_Danny  Netherlands
Messages: 2073
Registered: July 2007
Location: Netherlands
Grandmaster
LxCenter Core Team Member
LxCenter Representative

Also you might need to do something with logging?

You could also add some basic protections in it. (ddos, ssh attacks etc)




LxCenter - System Operations
Re: iptables rules that need testing [message #95122 is a reply to message #95117] Thu, 16 February 2012 21:50 Go to previous messageGo to next message
shazar is currently offline shazar  United States
Messages: 1856
Registered: May 2011
Grandmaster
LxCenter Core Team Member
LxCenter Representative
Danny - I can look into that as a separate chain or something that can be done from Kloxo. I don't think it should be open by default which is more what this is about.

I think lxguard will handle the ssh. I don't know about logging. Can you give specifics on what to log?


https://www.mercuryvps.com
HyperVM Xen VPS hosting
Re: iptables rules that need testing [message #95123 is a reply to message #95122] Thu, 16 February 2012 21:54 Go to previous messageGo to next message
shazar is currently offline shazar  United States
Messages: 1856
Registered: May 2011
Grandmaster
LxCenter Core Team Member
LxCenter Representative
Well let me restate - Is it ok to have mysql open remotely? Does kloxo and mysql handle allowing only certain ip addresses to try to authenticate? Sorry I haven't delved into that part of Kloxo yet.

https://www.mercuryvps.com
HyperVM Xen VPS hosting
Re: iptables rules that need testing [message #96808 is a reply to message #95123] Mon, 19 March 2012 08:54 Go to previous messageGo to next message
shazar is currently offline shazar  United States
Messages: 1856
Registered: May 2011
Grandmaster
LxCenter Core Team Member
LxCenter Representative
Why was this locked?

https://www.mercuryvps.com
HyperVM Xen VPS hosting
Re: iptables rules that need testing [message #96977 is a reply to message #96808] Thu, 22 March 2012 16:48 Go to previous messageGo to next message
Gerard is currently offline Gerard  Netherlands
Messages: 40
Registered: February 2012
Location: Hilversum, Netherlands
Member

I assume i need to copy this all to the /etc/sysconfig/iptables file, just on the CentOS way?

Newbie on Lxcenter Forum!

New with Linux. (version?)
New with CentOS. (version 5.8 )
Getting Better with Kloxo. (1 dedicated master running version 6.1.12)
Still busy with HyperVM. (1 dedicated master running version 2.0.7993 OpenVZ)


Translated Kloxo Dutch (NL)
Translated HyperVM Dutch (NL)
Re: iptables rules that need testing [message #96980 is a reply to message #96977] Thu, 22 March 2012 17:51 Go to previous messageGo to next message
shazar is currently offline shazar  United States
Messages: 1856
Registered: May 2011
Grandmaster
LxCenter Core Team Member
LxCenter Representative
Gerard - Read up on iptables. You simply run everything that I write there and one of the last commands saves the rules for you.

https://www.mercuryvps.com
HyperVM Xen VPS hosting
Re: iptables rules that need testing [message #97013 is a reply to message #96980] Fri, 23 March 2012 13:11 Go to previous messageGo to next message
Gerard is currently offline Gerard  Netherlands
Messages: 40
Registered: February 2012
Location: Hilversum, Netherlands
Member

Shazar - I need to read up more about a lot of things, but i need to start somewhere. So for now iptables is on top of the list.
Where and how do i need to run that script?

Thanks


Newbie on Lxcenter Forum!

New with Linux. (version?)
New with CentOS. (version 5.8 )
Getting Better with Kloxo. (1 dedicated master running version 6.1.12)
Still busy with HyperVM. (1 dedicated master running version 2.0.7993 OpenVZ)


Translated Kloxo Dutch (NL)
Translated HyperVM Dutch (NL)
Re: iptables rules that need testing [message #97014 is a reply to message #97013] Fri, 23 March 2012 13:28 Go to previous messageGo to next message
shazar is currently offline shazar  United States
Messages: 1856
Registered: May 2011
Grandmaster
LxCenter Core Team Member
LxCenter Representative
You can run it line by line or you can save it to a file and run the file. It sets the rules and saves it so when the server starts, the rules are loaded automatiocally. You never have to run it again. If you need to allow other ports, you can use one of the lines as an example, you just always have to run the save line so it keeps when you reboot.

https://www.mercuryvps.com
HyperVM Xen VPS hosting
Re: iptables rules that need testing [message #97015 is a reply to message #97014] Fri, 23 March 2012 13:39 Go to previous messageGo to next message
Gerard is currently offline Gerard  Netherlands
Messages: 40
Registered: February 2012
Location: Hilversum, Netherlands
Member

Thanks for your quick reply. Now its my turn to read and learn more about this stuff. Google is my best friend...Smile
Am i right that these rules are automatically saved in /etc/sysconfig/iptables?


Newbie on Lxcenter Forum!

New with Linux. (version?)
New with CentOS. (version 5.8 )
Getting Better with Kloxo. (1 dedicated master running version 6.1.12)
Still busy with HyperVM. (1 dedicated master running version 2.0.7993 OpenVZ)


Translated Kloxo Dutch (NL)
Translated HyperVM Dutch (NL)
Re: iptables rules that need testing [message #97017 is a reply to message #97015] Fri, 23 March 2012 13:54 Go to previous messageGo to next message
shazar is currently offline shazar  United States
Messages: 1856
Registered: May 2011
Grandmaster
LxCenter Core Team Member
LxCenter Representative
I think the save file is /etc/sysconfig/firewall. And with this script they are saved, but just adding a rule, they are not saved.

This line adds a rule:

iptables -A INPUT -p tcp --dport 21 -j ACCEPT


This takes effect immediately.

This line:

/etc/init.d/iptables save


Is what saves it to the file.

And when the server starts /etc/init.d/iptables start is run and in there you should be able to see where it loads the rules that were previously saved.


https://www.mercuryvps.com
HyperVM Xen VPS hosting
Re: iptables rules that need testing [message #97053 is a reply to message #97017] Sun, 25 March 2012 08:15 Go to previous messageGo to next message
Gerard is currently offline Gerard  Netherlands
Messages: 40
Registered: February 2012
Location: Hilversum, Netherlands
Member

The script runs like a sunshine. Nothing to say about it.
The rules are saved in /etc/sysconfig/iptables
This is what the file /etc/sysconfig/iptables shows after running your script.

# Generated by iptables-save v1.3.5 on Sun Mar 25 13:46:23 2012
*filter
:INPUT DROP [0:0]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -i lo -j ACCEPT 
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT 
-A INPUT -p icmp -j ACCEPT 
-A INPUT -p tcp -m tcp --dport 21 -j ACCEPT 
-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT 
-A INPUT -p tcp -m tcp --dport 25 -j ACCEPT 
-A INPUT -p tcp -m tcp --dport 53 -j ACCEPT 
-A INPUT -p udp -m udp --dport 53 -j ACCEPT 
-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT 
-A INPUT -p tcp -m tcp --dport 110 -j ACCEPT 
-A INPUT -p tcp -m tcp --dport 143 -j ACCEPT 
-A INPUT -p tcp -m tcp --dport 443 -j ACCEPT 
-A INPUT -p tcp -m tcp --dport 993 -j ACCEPT 
-A INPUT -p tcp -m tcp --dport 995 -j ACCEPT 
-A INPUT -p tcp -m tcp --dport 7777 -j ACCEPT 
-A INPUT -p tcp -m tcp --dport 7778 -j ACCEPT 
COMMIT
# Completed on Sun Mar 25 13:46:23 2012


Thanks for the support! Gerard


Newbie on Lxcenter Forum!

New with Linux. (version?)
New with CentOS. (version 5.8 )
Getting Better with Kloxo. (1 dedicated master running version 6.1.12)
Still busy with HyperVM. (1 dedicated master running version 2.0.7993 OpenVZ)


Translated Kloxo Dutch (NL)
Translated HyperVM Dutch (NL)
Re: iptables rules that need testing [message #98385 is a reply to message #97053] Wed, 30 May 2012 17:53 Go to previous messageGo to next message
florian26 is currently offline florian26  France
Messages: 50
Registered: May 2012
Valuable Member
Hello,

Thanks to this job.
But, i have a little problem :
When i write "iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT"
i have : "iptables: No chain/target/match by that name."

Do you have a solution ?
my iptables is upgrade in the last version.

Friendly,
Florian
Re: iptables rules that need testing [message #98387 is a reply to message #98385] Wed, 30 May 2012 20:34 Go to previous messageGo to next message
shazar is currently offline shazar  United States
Messages: 1856
Registered: May 2011
Grandmaster
LxCenter Core Team Member
LxCenter Representative
Are you sure ran everything as shown in the top post?

https://www.mercuryvps.com
HyperVM Xen VPS hosting
Re: iptables rules that need testing [message #98390 is a reply to message #98387] Thu, 31 May 2012 04:18 Go to previous messageGo to next message
florian26 is currently offline florian26  France
Messages: 50
Registered: May 2012
Valuable Member
Hello,

Yes, i have added the module. The first start, module is ok, but after it's not ok but i think that it's normal, we can't start twice the module.
I have put all port you ask, i have just add "echo - XXX : [OK]". If you want, i put this here.
Re: iptables rules that need testing [message #98399 is a reply to message #98390] Thu, 31 May 2012 11:32 Go to previous messageGo to next message
shazar is currently offline shazar  United States
Messages: 1856
Registered: May 2011
Grandmaster
LxCenter Core Team Member
LxCenter Representative
Run:

Quote:


iptables -F
iptables -X
service iptables save
service iptables restart


Paste the output from all of that.


https://www.mercuryvps.com
HyperVM Xen VPS hosting

[Updated on: Thu, 31 May 2012 11:32]

Report message to a moderator

Re: iptables rules that need testing [message #98404 is a reply to message #98399] Thu, 31 May 2012 13:37 Go to previous messageGo to next message
shazar is currently offline shazar  United States
Messages: 1856
Registered: May 2011
Grandmaster
LxCenter Core Team Member
LxCenter Representative
Florian - regarding your private message, I want you to delete any files that you previously created regarding this. You do not need a script file at the moment. I literally want you to run what I asked in my previous post. That is it. It is 4 lines that I want you to run and I want to know the output to see if that runs cleanly. If that all runs well enough, then you just need to run the lines that I posted in the very first post of this thread. No need to create a file or anything else. Simply run the lines 1 by 1 by copying and pasting.

https://www.mercuryvps.com
HyperVM Xen VPS hosting

[Updated on: Thu, 31 May 2012 13:38]

Report message to a moderator

Re: iptables rules that need testing [message #98408 is a reply to message #98404] Thu, 31 May 2012 15:23 Go to previous messageGo to previous message
florian26 is currently offline florian26  France
Messages: 50
Registered: May 2012
Valuable Member
Ok. I install back Centos5 64bits, it's easier.

[Updated on: Thu, 31 May 2012 15:31]

Report message to a moderator

Previous Topic:Accountlab Plus and other free billing systems
Next Topic:Kloxo on Linux Vserver
Goto Forum:
  


Current Time: Wed Jun 19 00:56:18 EDT 2013

Total time taken to generate the page: 0.01840 seconds
.:: Contact :: Home :: Privacy ::.

Click here to lend your support to: LxCenter and make a donation at www.pledgie.com !

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software