I have 5 ips
1.1.1.1
1.1.1.2
1.1.1.3
1.1.1.4
1.1.1.5
i already install openvz & openvz webpanel in main ip then create a vps with ip 1.1.1.2
i cant open 1.1.1.2, but if i disable iptables firewall, i can open it
service iptables save
service iptables stop
chkconfig iptables off
so i need to enable iptables firewall, what is the rule so i can to allow the server additional ips (1.1.1.2-1.1.1.5) in /etc/sysconfig/iptables ?
i tried these but still not right
-A INPUT -s 1.1.1.2 -j ACCEPT
-A INPUT -s 1.1.1.2 -d 1.1.1.5 -p tcp -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --s 1.1.1.2 -j ACCEPT
-A INPUT -i eth0 -m iprange --src-range 1.1.1.2-1.1.1.5 -j ACCEPT
please help guys
this is output of iptables -L -n -v, if needed
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 ACCEPT all -- eth0 * 0.0.0.0/0 0.0.0.0/0 source IP range 1.1.1.2-1.1.1.6
9243 1597K ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
2 92 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0
1318 70268 ACCEPT all -- lo * 0.0.0.0/0 0.0.0.0/0
1 60 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:22
197 17722 REJECT all -- * * 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
67 3375 REJECT all -- * * 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited
Chain OUTPUT (policy ACCEPT 10660 packets, 1713K bytes)
pkts bytes target prot opt in out source destination
this is output of ip a sh, if needed
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: usb0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
link/ether 36:40:b5:86:c5:6f brd ff:ff:ff:ff:ff:ff
3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 34:40:b5:86:c5:6c brd ff:ff:ff:ff:ff:ff
inet 1.1.1.1/29 brd 1.1.1.7 scope global eth0
inet6 fe80::3640:b5ff:fe86:c56c/64 scope link
valid_lft forever preferred_lft forever
4: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
link/ether 34:40:b5:86:c5:6d brd ff:ff:ff:ff:ff:ff
5: venet0: <BROADCAST,POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN
link/void
inet6 fe80::1/128 scope link
valid_lft forever preferred_lft forever