Sponsor:

Server and Web Integrator
Link:
Kloxo-MR logo
6.5.0 or 7.0.0
Click for "How to install"
Donation/Sponsorship:
Kloxo-MR is open-source.
Donate and or Sponsorship always welcome.
Click to:
Click Here
Please login or register. 2024-04-28, 02:36:22

Author Topic: How can i start iptables in kloxo Mr  (Read 11516 times)

0 Members and 1 Guest are viewing this topic.

Offline bb53

  • Junior Member
  • *
  • Posts: 42
  • Karma: +0/-0
    • View Profile
How can i start iptables in kloxo Mr
« on: 2013-06-17, 01:38:41 »
Dear Sir

How can i start iptables in kloxo Mr?

i use Centos 5.9 x64 and php53u + suphp event

I want to block bad ip in iptables

but i can't use iptables file and iptables start in service menu

Thank you
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: How can i start iptables in kloxo Mr
« Reply #1 on: 2013-06-17, 01:50:37 »
/etc/init.d/iptables start
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline chrisf

  • Senior Master
  • **
  • Posts: 883
  • Karma: +11/-1
  • Gender: Male
  • Be the change that you wish to see in the world.
    • View Profile
    • Conviction's Hosting
Re: How can i start iptables in kloxo Mr
« Reply #2 on: 2013-06-17, 02:44:20 »
iptables - first light green - second red.  It will always display that way - probably iptables IS running.  If you need help configuring the rules i can help.  Check under processes.
« Last Edit: 1970-01-01, 01:00:00 by Guest »
Christopher

Knowledge in: PHP, Perl, MySQL, Javascript, Actionscript, FLASH, HTML, CSS
Server Administrator / Developer: https://convictionshosting.com

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: How can i start iptables in kloxo Mr
« Reply #3 on: 2013-06-17, 02:54:21 »
Installing Kloxo-MR will be rename /etc/sysconfig/iptables and ip6tables to iptables.kloxosave and ip6tables.kloxasave if exists.

Purpose for renamed them because 'default' rules only permit access via port 22 (ssh) and then it make website, ftp, mail and Kloxo-MR panel unreachable.

You can rename to original name and modified rules.
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline bb53

  • Junior Member
  • *
  • Posts: 42
  • Karma: +0/-0
    • View Profile
Re: How can i start iptables in kloxo Mr
« Reply #4 on: 2013-06-17, 12:31:02 »
Quote from: "chrisf"
iptables - first light green - second red.  It will always display that way - probably iptables IS running.  If you need help configuring the rules i can help.  Check under processes.

Yes it's right.


Quote
Installing Kloxo-MR will be rename /etc/sysconfig/iptables and ip6tables to iptables.kloxosave and ip6tables.kloxasave if exists.

Purpose for renamed them because 'default' rules only permit access via port 22 (ssh) and then it make website, ftp, mail and Kloxo-MR panel unreachable.

You can rename to original name and modified rules.

I just rename iptables to iptables.kloxosave right and add block ip in iptables.kloxosave
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline bb53

  • Junior Member
  • *
  • Posts: 42
  • Karma: +0/-0
    • View Profile
Re: How can i start iptables in kloxo Mr
« Reply #5 on: 2013-06-17, 13:10:57 »
[root@xmlvps ~]#  service iptables start
Flushing firewall rules:                                   [  OK  ]
Setting chains to policy ACCEPT: nat mangle filter         [  OK  ]
Unloading iptables modules:                                [  OK  ]
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline bb53

  • Junior Member
  • *
  • Posts: 42
  • Karma: +0/-0
    • View Profile
Re: How can i start iptables in kloxo Mr
« Reply #6 on: 2013-06-17, 15:15:00 »
I rename to iptables and modified but in service menu State red light
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: How can i start iptables in kloxo Mr
« Reply #7 on: 2013-06-17, 18:31:18 »
Same to me ;)
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: How can i start iptables in kloxo Mr
« Reply #8 on: 2013-06-17, 18:46:45 »
Learn about how to set iptables rule. Kloxo/Kloxo-MR not setup for this rule.

Rule of iptables exist in /etc/sysconfig/iptables and ip6tables (not iptables.conf and ip6tables.conf). Rename iptables.kloxosave (if exists) or create the new one for enable iptables.
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: How can i start iptables in kloxo Mr
« Reply #9 on: 2013-06-17, 19:01:32 »
Quote from: "MRatWork"
Learn about how to set iptables rule. Kloxo/Kloxo-MR not setup for this rule.

Rule of iptables exist in /etc/sysconfig/iptables and ip6tables (not iptables.conf and ip6tables.conf). Rename iptables.kloxosave (if exists) or create the new one for enable iptables.

Iptables works for me without problems so why Kloxo is reporting is a RED ?
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline bb53

  • Junior Member
  • *
  • Posts: 42
  • Karma: +0/-0
    • View Profile
Re: How can i start iptables in kloxo Mr
« Reply #10 on: 2013-06-17, 22:21:33 »
I create file iptables.klxosave

[root@xmlvps ~]# service iptables restart
Flushing firewall rules:                                   [  OK  ]
Setting chains to policy ACCEPT: nat mangle filter         [  OK  ]
Unloading iptables modules:                                [  OK  ]




and i rename to iptables

[root@xmlvps ~]# service iptables restart
Flushing firewall rules:                                   [  OK  ]
Setting chains to policy ACCEPT: nat mangle filter         [  OK  ]
Unloading iptables modules:                                [  OK  ]
Applying iptables firewall rules: Bad argument `iptables'
Error occurred at line: 33
Try `iptables-restore -h' or 'iptables-restore --help' for more information.
                                                           [FAILED]


« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: How can i start iptables in kloxo Mr
« Reply #11 on: 2013-06-17, 22:31:31 »
Look like something wrong with iptables. See 'Applying iptables firewall rules: Bad argument `iptables', Error occurred at line: 33'
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline bb53

  • Junior Member
  • *
  • Posts: 42
  • Karma: +0/-0
    • View Profile
Re: How can i start iptables in kloxo Mr
« Reply #12 on: 2013-06-17, 22:55:54 »
Quote
# Firewall configuration written by system-config-securitylevel
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:RH-Firewall-1-INPUT - [0:0]
-A INPUT -j RH-Firewall-1-INPUT
-A FORWARD -j RH-Firewall-1-INPUT
-A RH-Firewall-1-INPUT -i lo -j ACCEPT

-A RH-Firewall-1-INPUT -p icmp --icmp-type any -j ACCEPT
-A RH-Firewall-1-INPUT -p 50 -j ACCEPT
-A RH-Firewall-1-INPUT -p 51 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp --dport 5353 -d 224.0.0.251 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp -m udp --dport 631 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 631 -j ACCEPT

-A RH-Firewall-1-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 21 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 443 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 7777 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 7778 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 7779 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -p tcp --dport 21 -j ACCEPT
-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited

COMMIT <------------------30

code in iptables

[root@xmlvps ~]# service iptables restart
Flushing firewall rules:                                   [  OK  ]
Setting chains to policy ACCEPT: nat mangle filter         [  OK  ]
Unloading iptables modules:                                [  OK  ]
Applying iptables firewall rules: iptables-restore v1.3.5: no command specified
Error occurred at line: 30
Try `iptables-restore -h' or 'iptables-restore --help' for more information.
                                                           [FAILED]
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline bb53

  • Junior Member
  • *
  • Posts: 42
  • Karma: +0/-0
    • View Profile
Re: How can i start iptables in kloxo Mr
« Reply #13 on: 2013-06-17, 22:56:59 »
use iptables not use iptables.kloxosave?
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline bb53

  • Junior Member
  • *
  • Posts: 42
  • Karma: +0/-0
    • View Profile
Re: How can i start iptables in kloxo Mr
« Reply #14 on: 2013-06-17, 23:10:32 »
status red light in service menu but it's enable in this status right

i don;t knowleadge about iptables

Thank you very much

[root@xmlvps ~]#  service iptables status
Table: nat
Chain PREROUTING (policy ACCEPT)
num  target     prot opt source               destination

Chain POSTROUTING (policy ACCEPT)
num  target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
num  target     prot opt source               destination

Table: mangle
Chain PREROUTING (policy ACCEPT)
num  target     prot opt source               destination

Chain INPUT (policy ACCEPT)
num  target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
num  target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
num  target     prot opt source               destination

Chain POSTROUTING (policy ACCEPT)
num  target     prot opt source               destination

Table: filter
Chain INPUT (policy ACCEPT)
num  target     prot opt source               destination
1    RH-Firewall-1-INPUT  all  --  0.0.0.0/0            0.0.0.0/0

Chain FORWARD (policy ACCEPT)
num  target     prot opt source               destination
1    RH-Firewall-1-INPUT  all  --  0.0.0.0/0            0.0.0.0/0

Chain OUTPUT (policy ACCEPT)
num  target     prot opt source               destination

Chain RH-Firewall-1-INPUT (2 references)
num  target     prot opt source               destination
1    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0
2    ACCEPT     icmp --  0.0.0.0/0            0.0.0.0/0           icmp type 255
3    ACCEPT     esp  --  0.0.0.0/0            0.0.0.0/0
4    ACCEPT     ah   --  0.0.0.0/0            0.0.0.0/0
5    ACCEPT     udp  --  0.0.0.0/0            224.0.0.251         udp dpt:5353
6    ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0           udp dpt:631
7    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:631
8    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED
9    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:21
10   ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:22
11   ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:80
12   ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:443
13   ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:7777
14   ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:7778
15   REJECT     all  --  0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited
« Last Edit: 1970-01-01, 01:00:00 by Guest »

 


Top 10 Social Networking:    Facebook    Twitter    LinkedIn    Pinterest    Google Plus    Tumblr    Instagram    VK    Flickr    Vine
Click Here

Page created in 0.032 seconds with 18 queries.

web stats analysis