Blocking specific MAC address from contacting meHow do I extract the source MAC from a [UFW BLOCK] entry?Block Ping from a specific IPIP address has incomplete MACHow to block ip forwarding for specific remote ip addressMAC address NAT with ebtables for IPv4 and IPv6?Get IP Address of Machine from Hostname or Mac-addressspoofed mac address changes when trying to connect to networkHow to Switch to Wifi if LAN internet is not working

What are the disadvantages for using short-field take-off technique?

Expectation of 500 coin flips after 500 realizations

Why does atmospheric pressure act on us?

Was Rabban Yochanan Ben Zakkai a priest? And was he Nasi of a sanhedrin?

Replace many strings by another string

Why is dwarfism considered an advantage for jobs in space?

Is my ESTA still valid though I've mislaid it?

How can conflict be conducted between nations when warfare is never an option?

Infant Mortality: Aluminum Electrolytic Capacitor short circuit failure

Theoretically, what if I were to change some magic numbers in, say, AES?

Tile-laying for beginners

legal rights of neighbouring property owners

Does the patient need to be immobile during the tending action from the Healer feat?

How to teach children Santa is not real, while respecting other kids beliefs?

Merging 4 matrices to one matrix

Python Code for List of Month Names starting with current month

What if I take Necrotic damage more than my hit point total?

Do I need to rip the leaves off mint?

Is there a BIOS setting that controls cpu load sharing?

Can I be fired the same day that I hand in my notice?

Which species is proud of being conquered many times?

Why did George Lucas set Star Wars in the past instead of the future?

Who is the narrator of Star Wars?

Is leave-one-out cross validation (LOOCV) known to systematically overestimate error?



Blocking specific MAC address from contacting me


How do I extract the source MAC from a [UFW BLOCK] entry?Block Ping from a specific IPIP address has incomplete MACHow to block ip forwarding for specific remote ip addressMAC address NAT with ebtables for IPv4 and IPv6?Get IP Address of Machine from Hostname or Mac-addressspoofed mac address changes when trying to connect to networkHow to Switch to Wifi if LAN internet is not working






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;









2


















Could I block a specific MAC address on my LAN from contacting me?



I know I could do it from router or switch.



But I wanna learn if it is possible in Ubuntu(Linux) commands.










share|improve this question



























  • Check your router manual.

    – Rinzwind
    Jan 24 '14 at 11:09











  • I want to do it in Ubuntu. Is it possible?

    – Maythux
    Jan 24 '14 at 11:10











  • The mac tag is about Macintosh computers...

    – Eero Aaltonen
    Jan 24 '14 at 11:52











  • The tag is about Macintosh computers, see taginfo

    – Eero Aaltonen
    Jan 27 '14 at 11:44












  • @EeroAaltonen Ok i got you

    – Maythux
    Jan 27 '14 at 11:51

















2


















Could I block a specific MAC address on my LAN from contacting me?



I know I could do it from router or switch.



But I wanna learn if it is possible in Ubuntu(Linux) commands.










share|improve this question



























  • Check your router manual.

    – Rinzwind
    Jan 24 '14 at 11:09











  • I want to do it in Ubuntu. Is it possible?

    – Maythux
    Jan 24 '14 at 11:10











  • The mac tag is about Macintosh computers...

    – Eero Aaltonen
    Jan 24 '14 at 11:52











  • The tag is about Macintosh computers, see taginfo

    – Eero Aaltonen
    Jan 27 '14 at 11:44












  • @EeroAaltonen Ok i got you

    – Maythux
    Jan 27 '14 at 11:51













2













2









2


1






Could I block a specific MAC address on my LAN from contacting me?



I know I could do it from router or switch.



But I wanna learn if it is possible in Ubuntu(Linux) commands.










share|improve this question
















Could I block a specific MAC address on my LAN from contacting me?



I know I could do it from router or switch.



But I wanna learn if it is possible in Ubuntu(Linux) commands.







networking lan






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited May 29 '15 at 14:58







Maythux

















asked Jan 24 '14 at 11:05









MaythuxMaythux

62.6k36 gold badges190 silver badges236 bronze badges




62.6k36 gold badges190 silver badges236 bronze badges















  • Check your router manual.

    – Rinzwind
    Jan 24 '14 at 11:09











  • I want to do it in Ubuntu. Is it possible?

    – Maythux
    Jan 24 '14 at 11:10











  • The mac tag is about Macintosh computers...

    – Eero Aaltonen
    Jan 24 '14 at 11:52











  • The tag is about Macintosh computers, see taginfo

    – Eero Aaltonen
    Jan 27 '14 at 11:44












  • @EeroAaltonen Ok i got you

    – Maythux
    Jan 27 '14 at 11:51

















  • Check your router manual.

    – Rinzwind
    Jan 24 '14 at 11:09











  • I want to do it in Ubuntu. Is it possible?

    – Maythux
    Jan 24 '14 at 11:10











  • The mac tag is about Macintosh computers...

    – Eero Aaltonen
    Jan 24 '14 at 11:52











  • The tag is about Macintosh computers, see taginfo

    – Eero Aaltonen
    Jan 27 '14 at 11:44












  • @EeroAaltonen Ok i got you

    – Maythux
    Jan 27 '14 at 11:51
















Check your router manual.

– Rinzwind
Jan 24 '14 at 11:09





Check your router manual.

– Rinzwind
Jan 24 '14 at 11:09













I want to do it in Ubuntu. Is it possible?

– Maythux
Jan 24 '14 at 11:10





I want to do it in Ubuntu. Is it possible?

– Maythux
Jan 24 '14 at 11:10













The mac tag is about Macintosh computers...

– Eero Aaltonen
Jan 24 '14 at 11:52





The mac tag is about Macintosh computers...

– Eero Aaltonen
Jan 24 '14 at 11:52













The tag is about Macintosh computers, see taginfo

– Eero Aaltonen
Jan 27 '14 at 11:44






The tag is about Macintosh computers, see taginfo

– Eero Aaltonen
Jan 27 '14 at 11:44














@EeroAaltonen Ok i got you

– Maythux
Jan 27 '14 at 11:51





@EeroAaltonen Ok i got you

– Maythux
Jan 27 '14 at 11:51










1 Answer
1






active

oldest

votes


















6



















You can drop from a source MAC address, yeah:



sudo iptables -A INPUT -m mac --mac-source 00:00:00:00:00:AA -j DROP


Obviously, you'll need to change that address.



If you want to make that permanent, make sure ufw is installed and then edit /etc/ufw/before.rules to have something like this before the COMMIT:



-A ufw-before-input -m mac --mac-source 00:00:00:00:00:AA -j DROP





share|improve this answer

























  • And if your machine has other iptables rules set up (e.g. configured as a router), then to function, the DROP rule has to be before them in the list, to take precedence. Then use -I INPUT ("insert at pos 1"), not -A INPUT ("append").

    – tanius
    Mar 22 '18 at 2:32












Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);














draft saved

draft discarded
















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f410023%2fblocking-specific-mac-address-from-contacting-me%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown


























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









6



















You can drop from a source MAC address, yeah:



sudo iptables -A INPUT -m mac --mac-source 00:00:00:00:00:AA -j DROP


Obviously, you'll need to change that address.



If you want to make that permanent, make sure ufw is installed and then edit /etc/ufw/before.rules to have something like this before the COMMIT:



-A ufw-before-input -m mac --mac-source 00:00:00:00:00:AA -j DROP





share|improve this answer

























  • And if your machine has other iptables rules set up (e.g. configured as a router), then to function, the DROP rule has to be before them in the list, to take precedence. Then use -I INPUT ("insert at pos 1"), not -A INPUT ("append").

    – tanius
    Mar 22 '18 at 2:32















6



















You can drop from a source MAC address, yeah:



sudo iptables -A INPUT -m mac --mac-source 00:00:00:00:00:AA -j DROP


Obviously, you'll need to change that address.



If you want to make that permanent, make sure ufw is installed and then edit /etc/ufw/before.rules to have something like this before the COMMIT:



-A ufw-before-input -m mac --mac-source 00:00:00:00:00:AA -j DROP





share|improve this answer

























  • And if your machine has other iptables rules set up (e.g. configured as a router), then to function, the DROP rule has to be before them in the list, to take precedence. Then use -I INPUT ("insert at pos 1"), not -A INPUT ("append").

    – tanius
    Mar 22 '18 at 2:32













6















6











6









You can drop from a source MAC address, yeah:



sudo iptables -A INPUT -m mac --mac-source 00:00:00:00:00:AA -j DROP


Obviously, you'll need to change that address.



If you want to make that permanent, make sure ufw is installed and then edit /etc/ufw/before.rules to have something like this before the COMMIT:



-A ufw-before-input -m mac --mac-source 00:00:00:00:00:AA -j DROP





share|improve this answer














You can drop from a source MAC address, yeah:



sudo iptables -A INPUT -m mac --mac-source 00:00:00:00:00:AA -j DROP


Obviously, you'll need to change that address.



If you want to make that permanent, make sure ufw is installed and then edit /etc/ufw/before.rules to have something like this before the COMMIT:



-A ufw-before-input -m mac --mac-source 00:00:00:00:00:AA -j DROP






share|improve this answer













share|improve this answer




share|improve this answer










answered Jan 24 '14 at 11:21









OliOli

248k96 gold badges598 silver badges784 bronze badges




248k96 gold badges598 silver badges784 bronze badges















  • And if your machine has other iptables rules set up (e.g. configured as a router), then to function, the DROP rule has to be before them in the list, to take precedence. Then use -I INPUT ("insert at pos 1"), not -A INPUT ("append").

    – tanius
    Mar 22 '18 at 2:32

















  • And if your machine has other iptables rules set up (e.g. configured as a router), then to function, the DROP rule has to be before them in the list, to take precedence. Then use -I INPUT ("insert at pos 1"), not -A INPUT ("append").

    – tanius
    Mar 22 '18 at 2:32
















And if your machine has other iptables rules set up (e.g. configured as a router), then to function, the DROP rule has to be before them in the list, to take precedence. Then use -I INPUT ("insert at pos 1"), not -A INPUT ("append").

– tanius
Mar 22 '18 at 2:32





And if your machine has other iptables rules set up (e.g. configured as a router), then to function, the DROP rule has to be before them in the list, to take precedence. Then use -I INPUT ("insert at pos 1"), not -A INPUT ("append").

– tanius
Mar 22 '18 at 2:32


















draft saved

draft discarded















































Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f410023%2fblocking-specific-mac-address-from-contacting-me%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown









Popular posts from this blog

Tamil (spriik) Luke uk diar | Nawigatjuun

Align equal signs while including text over equalitiesAMS align: left aligned text/math plus multicolumn alignmentMultiple alignmentsAligning equations in multiple placesNumbering and aligning an equation with multiple columnsHow to align one equation with another multline equationUsing \ in environments inside the begintabularxNumber equations and preserving alignment of equal signsHow can I align equations to the left and to the right?Double equation alignment problem within align enviromentAligned within align: Why are they right-aligned?

Where does the image of a data connector as a sharp metal spike originate from?Where does the concept of infected people turning into zombies only after death originate from?Where does the motif of a reanimated human head originate?Where did the notion that Dragons could speak originate?Where does the archetypal image of the 'Grey' alien come from?Where did the suffix '-Man' originate?Where does the notion of being injured or killed by an illusion originate?Where did the term “sophont” originate?Where does the trope of magic spells being driven by advanced technology originate from?Where did the term “the living impaired” originate?