how do i connect Qt with Iptables?
I tried to add rules in ipTables using
QString prog = "/bin/bash";
QStringList arguments;
arguments << "-c" << "iptables -A "<<ui->comboBox->currentText()<<" -p icmp -i eth0 -j DROP";
QProcess* process = new QProcess(this);
process->start(prog , arguments);
process->waitForFinished();
QString tmp = process->readAll();
qDebug() << tmp;
just a trial run but the rule doesnt get added to iptables.
It did when I run this code a week ago, please suggest some changes so that this code works!
Bookmarks