Whenever I tried to use ettercap with iptable redir; I got a message called can't initialize ip table 'nat' because permission denied or kernel need to be upgrade.
Note I loged on as root.
Printable View
Whenever I tried to use ettercap with iptable redir; I got a message called can't initialize ip table 'nat' because permission denied or kernel need to be upgrade.
Note I loged on as root.
Error message from ettercap:
From terminal/shell prompt:Code:SEND L3 ERROR: 60 byte packet (0800:01) destined to 192.168.1.5 was not forwarded (libnet_write_raw_ipv4(): -1 bytes written (Operation not permitted)
)
SEND L3 ERROR: 29 byte packet (0800:01) destined to 192.168.1.5 was not forwarded (libnet_write_raw_ipv4(): -1 bytes written (Operation not permitted)
)
Note: I run it as root. From root account (and also use sudo command).Code:ettercap NG-0.7.3 copyright 2001-2004 ALoR & NaGA
iptables v1.3.5: can't initialize iptables table `nat': Permission denied (you must be root)
Perhaps iptables or your kernel needs to be upgraded.
iptables v1.3.5: can't initialize iptables table `nat': Permission denied (you must be root)
Perhaps iptables or your kernel needs to be upgraded.
iptables v1.3.5: can't initialize iptables table `nat': Permission denied (you must be root)
Perhaps iptables or your kernel needs to be upgraded.
iptables v1.3.5: can't initialize iptables table `nat': Permission denied (you must be root)
Perhaps iptables or your kernel needs to be upgraded.
iptables v1.3.5: can't initialize iptables table `nat': Permission denied (you must be root)
Perhaps iptables or your kernel needs to be upgraded.
iptables v1.3.5: can't initialize iptables table `nat': Permission denied (you must be root)
Perhaps iptables or your kernel needs to be upgraded.
iptables v1.3.5: can't initialize iptables table `nat': Permission denied (you must be root)
Perhaps iptables or your kernel needs to be upgraded.
iptables v1.3.5: can't initialize iptables table `nat': Permission denied (you must be root)
Perhaps iptables or your kernel needs to be upgraded.
iptables v1.3.5: can't initialize iptables table `nat': Permission denied (you must be root)
Perhaps iptables or your kernel needs to be upgraded.
What is the solution please?
maybe there's missing some chmod+x somewhere...i mean executable permission for some iptable stuff....but really not sure.....
nano /usr/local/etc/etter.conf
change from
#redir_command_on = "iptables -t nat -A PREROUTING -i %iface -p tcp --dport %port -j REDIRECT --to-port %rport"
#redir_command_off = "iptables -t nat -D PREROUTING -i %iface -p tcp --dport %port -j REDIRECT --to-port %rport"
to
redir_command_on = "iptables -t nat -A PREROUTING -i %iface -p tcp --dport %port -j REDIRECT --to-port %rport"
redir_command_off = "iptables -t nat -D PREROUTING -i %iface -p tcp --dport %port -j REDIRECT --to-port %rport"
notice the uncomment ( # )
save
this should help
The problem arise after uncomment those lines.Quote:
nano /usr/local/etc/etter.conf
change from
#redir_command_on = "iptables -t nat -A PREROUTING -i %iface -p tcp --dport %port -j REDIRECT --to-port %rport"
#redir_command_off = "iptables -t nat -D PREROUTING -i %iface -p tcp --dport %port -j REDIRECT --to-port %rport"
to
redir_command_on = "iptables -t nat -A PREROUTING -i %iface -p tcp --dport %port -j REDIRECT --to-port %rport"
redir_command_off = "iptables -t nat -D PREROUTING -i %iface -p tcp --dport %port -j REDIRECT --to-port %rport"
notice the uncomment ( # )
save
this should help
I don't think so, because I made executable everything inside 'ipv4' directory. But may be you are right, then the question is what should be executable?Quote:
maybe there's missing some chmod+x somewhere...i mean executable permission for some iptable stuff....but really not sure.....
make sure those two lines only use one line each. when you open the konsole, view it on full screen then go into etter.conf
i had this problem and thats how i solved it.
When I use terminal (nano without full screen) then it was the problem, not in kwrite. Anyway those two lines only use one line each. If they are not then I got a different error message with the line number of etter.conf. May be real problem is some where else.Quote:
make sure those two lines only use one line each. when you open the konsole, view it on full screen then go into etter.conf
i had this problem and thats how i solved it.
Note: I tried with enable/disable the the ipforwarding. Both has same result. Though when ipforwarding was disabled then I got additional massage 'Ip forwarding disabled'.
Note: I use following line to enable the ip forwarding.
Is there anything wrong (in ip forwarding)? Is it really problem with privilage? I don't think I have to upgrade the kernel (most of you use same kernel and it works).Code:echo 1>proc/sys/net/ipv4/ip_forward
sorry that didnt help, i tried :(
May be I have something wrong. But I don't know where it is. I have no problem with sniffing without ssl. When I want to sniff ssl and follow the procedure I failed. :(
I had the same problem after installing a firewall. If you have any firewall installed uninstall it, than reinstall iptables and reboot. Hope this helps, worked for me.