1

I've been browsing and reading documentations all night and I can't figure out any solution...

I'm trying to get iptables working on my VPS (Debian 7).

But I can't get established connections answered. The "-m state --state" and also "-m conntrack --ctstate" both don't work. Both result in iptables: No chain/target/match by that name.

As far as I figured out, state has been outsourced from iptables and conntrack isn't installed on my system and isn't possible to be installed because I ain't got Kernel-Access to the network interfaces system. I tried to install it from scratch but both tries (from packages and from source) failed. I changed the system to Ubuntu 14.04 for try but it didn't work either.

Is there any workaround or anything else I can do? I'm regulary using PF with OpenBSD as Firewall, so I'm not very familiar with iptables.

Here are the rules I'm adding - have I maybe forgotten something?

iptalbes -F
iptables -A OUTPUT -j ACCEPT
iptables -A FORWARD -j DROP
iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -p icmp --icmp-type echo-reply -j ACCEPT
iptables -A INPUT -p icmp --icmp-type destination-unreachable -j ACCEPT
iptables -A INPUT -p icmp --icmp-type time-exceeded -j ACCEPT
iptables -A INPUT -p icmp --icmp-type echo-request -j ACCEPT
iptables -A INPUT -m tcp -p tcp --dport 22 -j ACCEPT
iptables -A INPUT -m tcp -p tcp --dport 80 -j ACCEPT
iptables -A INPUT -m tcp -p tcp --dport 21 -j ACCEPT
iptables -A INPUT -j LOG
iptables -A INPUT -j DROP

All rules beside the mentioned one are working well!

I found this question asked here before but there were no helpful answers or solutions.

I'm thankful for any help in advance :)

1 Answers1

0

Is kernel module nf_conntrack exist at /lib/modules//kernel/net/netfilter/ and loaded? If exist try:

modprobe nf_conntrack
Maxiko
  • 474