Tuesday, 19 April 2011

FreeBSD ping: sendto: Permission denied

Sometime we can forgot whatever we set-up at server and reboot after 5 months may bring very interesting situations.

One of them happened to me last time. Server stopped respond after restart. In hosting company were not able to help. They disabled many things in rc.conf, ran fsck on HDD. No another idea. BUT Nowadays we have nice things called KVM which bring terminal right to our desk.

Here is the problem:
# ping localhost
# ping: sendto: Permission denied

I moved from IPFW2 to PF few months ago and there were few restarts without problem.
So firstly I tried to stop firewall(s) with system scripts:
/etc/rc.d/ipfw stop
/etc/rc.d/pf stop

All seems be ok but wasn't help.
I did check MYKERNEL config and there were some KERNEL OPTIONS
options    IPFIREWALL

So this is mistake, remove unwanted options and recompile kernel.

While I waited I tried to play with IPFW.
# ipfw list
65535 deny ip from any to any

Yes, it was clear now. I need just little simple thing -> allowing communication.
# ipfw add allow all from any to any
# ping
# ping myIP
# ping gateway
All ok

I recompiled kernel without IPFW and restarted.

It is running now :)

0 komentářů:

Post a Comment