You are not logged in.

#1 2019-02-25 19:02:58

gus9182
Member
Registered: 2018-08-08
Posts: 14

Block enthernet interface from geting an ip from specific server

Hello everyone,

Someone at my university connected a router into the wired network of my department and sometimes I am getting an ip from this router instead of the official university switch. I contacted the IT department but they are taking too long to block this router. So I was wondering if I can block it, by its MAC, in my computer. Is it possible? Can someone help me? I am using NetworkManager.

Offline

#2 2019-02-25 19:41:13

gus9182
Member
Registered: 2018-08-08
Posts: 14

Re: Block enthernet interface from geting an ip from specific server

I added this rule to iptables to drop packets from the router:

 iptables -A INPUT -m mac --mac-source 00:26:5A:A6:19:A0 -j DROP 

However, it is not connecting to the right one.

Last edited by gus9182 (2019-02-25 19:41:53)

Offline

#3 2019-02-25 20:21:22

seth
Member
Registered: 2012-09-03
Posts: 49,960

Re: Block enthernet interface from geting an ip from specific server

If the rouge dhcp server is routed, the MAC is the one of the router.
Configure networkmanager to use dhcpcd as dhcp client and configure the latter to either blacklist the malign or whitelist the good IP (ranges)?
To find all dhcp servers, run eg. " nmap --script broadcast-dhcp-discover".

Online

Board footer

Powered by FluxBB