codeforge Posted November 29, 2017 Share Posted November 29, 2017 Hi, i'm trying to block all connection from a specified mac address but it doesn't work. The payload that i'm using is this: #!/bin/bash # LOCK MAC ADDRESS function setup() { # Show SETUP LED LED SETUP # Set the network mode to NAT NETMODE BRIDGE sleep 7 } function run() { # Show ATTACK LED LED ATTACK # Block all traffic for/from specified mac address iptables -A INPUT -m mac --mac-source 00:12:34:56:78:90 -j DROP sleep 3 } setup run What i'm doing wrong? Thanks Link to comment Share on other sites More sharing options...
biob Posted November 29, 2017 Share Posted November 29, 2017 I’m a total noob, but have you tried setting the rule up for a specific NIC on the PS? Link to comment Share on other sites More sharing options...
Dave-ee Jones Posted November 30, 2017 Share Posted November 30, 2017 Here's the results of a quick Google: https://www.cyberciti.biz/tips/iptables-mac-address-filtering.html Link to comment Share on other sites More sharing options...
codeforge Posted November 30, 2017 Author Share Posted November 30, 2017 13 hours ago, biob said: I’m a total noob, but have you tried setting the rule up for a specific NIC on the PS? I don't try specifying the nic but i will try. Thanks Link to comment Share on other sites More sharing options...
codeforge Posted November 30, 2017 Author Share Posted November 30, 2017 7 hours ago, Dave-ee Jones said: Here's the results of a quick Google: https://www.cyberciti.biz/tips/iptables-mac-address-filtering.html I already see this page and try it but nothing change, i try many google result but no one can block traffic from mac address (in or out). I try to use NETMODE BRIDGE and NETMODE NAT too. I want to try to restart iptables service but in PS i cannot find service command or /etc/init.d/iptables command, so i don't know how to restart it when in arming mode. Link to comment Share on other sites More sharing options...
codeforge Posted November 30, 2017 Author Share Posted November 30, 2017 5 hours ago, codeforge said: I don't try specifying the nic but i will try. Thanks Hi, specifying the nic is the correct command. Now it's working. Thanks Link to comment Share on other sites More sharing options...
biob Posted December 1, 2017 Share Posted December 1, 2017 On 30/11/2017 at 3:36 PM, codeforge said: Hi, specifying the nic is the correct command. Now it's working. Thanks I actually got something right, it’s my lucky day Link to comment Share on other sites More sharing options...
tummyacid Posted December 8, 2017 Share Posted December 8, 2017 can you please post the final working iptables command? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.