In most Linux installations iptables will be owned by root, and thus MIS>will not have access to us
You'd need to either chmod the iptables binary setuid root (not recommende or give the bbs user sudo permission to it and have them run it that way.
So it sounds like to me the recommended way to do it then would be to configure the bbs user to be able to sudo iptables without a password?
eg: echo "mypassword" | sudo iptables -I INPUT -s 104.93.81.50 -j DROP
On 12/22/17, Static said the following...
eg: echo "mypassword" | sudo iptables -I INPUT -s 104.93.81.50 -j DRO
And of course I forget the actual switch:
echo "mypassword" | sudo -S iptables -I INPUT -s 104.93.81.50 -j DROP
And of course I forget the actual switch:
echo "mypassword" | sudo -S iptables -I INPUT -s 104.93.81.50 -j DROP
g00r00 wrote to Static <=-
So it sounds like to me the recommended way to do it then would be to configure the bbs user to be able to sudo iptables without a password?
Static wrote to g00r00 <=-
On 12/22/17, g00r00 said the following...
So it sounds like to me the recommended way to do it then would be to configure the bbs user to be able to sudo iptables without a password?
You should also be able to pipe a password to sudo using the -S switch
to have it read from stdin, should you not want it to operate passwordless. eg: echo "mypassword" | sudo iptables -I INPUT -s 104.93.81.50 -j DROP
Well that works nicely! .. but I think I have the event configured wrong or one of the other parameters wrong in mystic-cfg. Using @IP@ instead
of a specific IP. It is currently autobanning and adding iptable DROPs
for every connection... including myself..haha.
Have to be careful that can't be easily read on your system, otherwise
you might be giving a sensitive password away. :)
Static wrote to vk3jed <=-
On 12/23/17, Tony Langdon said the following...
Have to be careful that can't be easily read on your system, otherwise
you might be giving a sensitive password away. :)
True, but at least if someone finds a way to execute arbitrary commands
as the mystic user they have to find the user's password before they
can ban 0.0.0.0/0.
Ouch. The "IP Blocked" event type should only fire if Mystic actually
bans an IP or blocks a connection from an IP in its blacklist. I only
When the Event is enabled it adds the iptables rule *and* adds the IP
to the blacklist.txt file. When the Event is not enabled it does neither.
That definitely shouldn't be the case. The IP Blocked event shouldn't activate at all on a benign connection. How many connections are you allowing over how much time on your servers before blocking?
Sysop: | sneaky |
---|---|
Location: | Ashburton,NZ |
Users: | 2 |
Nodes: | 8 (0 / 8) |
Uptime: | 87:13:22 |
Calls: | 2,122 |
Calls today: | 3 |
Files: | 11,149 |
D/L today: |
30 files (10,780K bytes) |
Messages: | 950,646 |