Ip mac binding linux

Ip mac binding linux

System supports IP-MAC binding, MAC-Port binding and IP-MAC-Port binding to reinforce network security control. The bindings obtained from ARP/MAC learning and ARP scan are known as dynamic bindings, and those manually configured are known as static bindings.

This section describes how to configure an IP-MAC binding.

Adding a Static IP-MAC Binding

To add a static IP-MAC binding, take the following steps:

  1. On the Navigation pane, click Configure >Security >ARP Defense to visit the ARP Defense page.
  2. Click New. In the Add IP-MAC Binding dialog, configure options.
  • MAC: Specifies a MAC address.
  • IP: Specifies an IP address.
  • Port: Select the Enable check box to enable port binding, and then select a port from the drop-down list behind.
  • VLAN ID: If port binding is enabled, select a VLAN ID from the drop-down list.
  • Description: Type the description for the IP-MAC binding.
  • Authenticated ARP: Select the Enable check box to enable this function.

Obtaining a Dynamic IP-MAC Binding

System can obtain dynamic IP-MAC-Port binding information from:

To configure ARP/MAC learning, take the following steps:

  1. On the Navigation pane, click Configure >Security >ARP Defense to visit the ARP Defense page.
  2. Select ARP/MAC Learning from the Others drop-down list.
  3. In the ARP/MAC Learning Configuration dialog, select the Enable check box(es) for the interface(s) you want to enable ARP/MAC learning.
  4. Click OK to save your settings and return to the ARP Defense page.

To configure ARP scan, take the following steps:

  1. On the Navigation pane, click Configure >Security >ARP Defense to visit the ARP Defense page.
  2. Select IP-MAC Scan from the Binding Configuration drop-down list.
  3. In the IP-MAC Scan dialog, type the start IP and end IP into the Start IP and End IP box respectively.
  4. Click OK to scan the specified IP range. The scan result will be displayed in the binding list of the ARP Defense page.

Configuring an IP-MAC-Port Binding

To configure an IP-MAC-Port binding, take the following steps:

  1. On the Navigation pane, click Configure >Security >ARP Defense to visit the ARP Defense page.
  2. Select Bind All from the Binding Configuration drop-down list.
  3. In the Bind All dialog, click a binding type and click OK to save your settings.

To unbind an IP-MAC-Port binding, take the following steps:

  1. On the Navigation pane, click Configure >Security >ARP Defense to visit the ARP page.
  2. Select Unbind All from the Binding Configuration drop-down list.
  3. In the Unbind All dialog, click an unbinding type and click OK to save your settings.

Deleting a Binding

To delete a binding, take the following steps:

  1. On the Navigation pane, click Configure >Security >ARP Defense to visit the ARP Defense page.
  2. Select the binding you want to delete from the binding list, and click Delete.

Importing/Exporting a Binding

To import a binding, take the following steps:

  1. On the Navigation pane, click Configure >Security >ARP Defense to visit the ARP Defense page.
  2. Select Import from the Others drop-down list.
  3. In the Import dialog, click Browse to select an IP-MAC binding file (UTF-8 encoding).
  4. Click OK to save your settings.

To export a binding, take the following steps:

  1. On the Navigation pane, click Configure >Security >ARP Defense to visit the ARP Defense page.
  2. Select Export from the Others drop-down list.
  3. In the Export dialog, click a binding information type.
  4. Click OK to save your settings.

Источник

bind the MAC with IP address?

I have configured a DHCP server on Linux. My goal is to map client IP address with their MAC address in such a way that no «unregistered» client machine gets a response from the DHCP server. That is, I would like to give them Internet access one by one through IP and MAC binding.

Please clarify: are you saying that you want your DHCP server to only answer requests from clients with known MAC addresses? Do you need this to work with ISC dhcpd (shipped with RHEL), or are you willing to try a third-party server if that’s what’s needed to make this work? Also, why are you doing this? If it’s for security, it’s not going to help much; it’s way too easy to defeat.

@Warren: considering user2914’s posting history, this is homework. @user2914: Homework questions are ok here (at least they’re ok on Stack Overflow and I don’t see why this site should be different), but you shouldn’t try to hide it, that won’t help you get better replies (it’s usually obvious anyway and seeing that you tried to hide it makes people less willing to help you).

@Warren Young My main purpose is to map client IP address with their MAC address in such a way that no client machine get IP from DHCP server. this means that I would like to give them Internet access one by one through IP and MAC binding. Moreover, without mac binding no system should get IP from DHCP server. The client machine whose MAC address is not enterd in server, should not get ip address from DHCP server. So how can I implement this in Linux (RHEL 5 ) machine?

Источник

How can I assign an IP by MAC address in dhcpd

in my dhcpd.conf. But after restarting dhcpd and the machine with the mac address in question I just get a random IP again.

4 Answers 4

This is perfectly fine format — I use exactly the same. Only I append a comment in the end of line (in addition). This is excerpt from working dhcpd.conf :

host wrt45gl-etika < hardware ethernet 00:21:29:a1:c3:a1; fixed-address ---.219.43.135; ># MSIE routeris WRT54GL 

As @Christoph mentions, there may be global option declared (or service defaults used) which may impact a way IPs are assigned / may override it.

While migrating from dhcp3-server (v3) to isc-dhcp-server (v4) I needed to add some mandatory options and rewrite some declarations. But the structure of config file remained simple:

# # Sample configuration file for ISC dhcpd for Debian # # The ddns-updates-style parameter controls whether or not the server will # attempt to do a DNS update when a lease is confirmed. We default to the # behavior of the version 2 packages ('none', since DHCP v2 didn't # have support for DDNS.) ddns-update-style none; # option definitions common to all supported networks. option domain-name "mf.vu.---"; option domain-name-servers ---.219.80.11, ---.219.80.2, ---.171.22.22; default-lease-time 2678400; max-lease-time 2678400; # If this DHCP server is the official DHCP server for the local # network, the authoritative directive should be uncommented. authoritative; # Use this to send dhcp log messages to a different log file (you also # have to hack syslog.conf to complete the redirection). log-facility local7; # The subnet that shares this physical network shared-network TOTAL_MF < server-name "letta.mf.vu.--"; subnet ---.219.43.128 netmask 255.255.255.192 < option routers ---.219.43.190; option broadcast-address ---.219.43.191; group < host wrt45gl-etika < hardware ethernet 00:21:29:a1:c3:a1; fixed-address ---.219.43.135; ># MSIE routeris WRT54GL # . host saulute < hardware ethernet 00:21:28:10:f4:16; fixed-address ---.219.43.189; ># Virtual Qemu PC NIC > > subnet 172.16.43.128 netmask 255.255.255.192 < option routers 172.16.43.129; option broadcast-address 172.16.43.191; group< host ligo < hardware ethernet 08:00:20:7A:E2:70; fixed-address 172.16.43.179; >#a225 ligo # . host vumfsa2 < hardware ethernet 00:80:48:8d:12:f0; fixed-address 172.16.43.140; ># 118 > > > 

There I used no pool , no range declarations. There are only two subnet declarations (one followed by another).

There I got no random IPs assigned to my hosts which are declared here (tied to MACs).

Источник

Методы привязки пользователя к своему IP в сети

Существует множество типов сетей с различным устройством и принципами идентификации пользователей для подсчета трафика, нарезки тарифных скоростей и ограничения доступа в сеть неплательщикам.
У каждого из вариантов есть свои особенности и свои недостатки
В этой статье я постараюсь рассказать о наиболее используемых методах идентификации пользователей которые успешно применяются в сетях небольших и крупных провайдерах

Привязки на основе так называемого VPN:
Идентификация пользователя и доступ в сеть осуществляется на основе проверки его имени пользователя и пароля (login/password)

1) PPTP,L2tp – чаще всего применяются в сетях с неуправляемым оборудованием или
неуправляемых сегментах сети (исключения Корбина-Телеком + возможно еще
какие-то сети)

При такой схеме идентификация клиента – для выхода в Интернет надо поднять
VPN туннель, идентификация пользователя происходит по логину/паролю. Далее
на основе этих атрибутов VPN сервер делает запрос к Radius-у и тот уже говорит
выпускать или нет клиента в сеть + возможную тарифную скорость этого клиента
(если шейпинг осуществляется средствами самого VPN сервера)

2) PPPoE – применяется в сетях с управляемым оборудованием (есть люди которые и в неуправляемых
сегментах его применяют, но это большой риск так-как существует большая вероятность появление левых
PPPoE серверов со всеми вытекающими). На сколько знаю применяется эта схема идентификации
пользователя у операторов Стрим-ТВ и Петерстар, данная схема очень похожа на схему с использованием
PPTP(PPPoE сервер + radius)

3) OpenVPN – теоритечески возможно и с его помощью авторизоввывать пользователей, но практическое
использование его для таких целей не встречал, если есть такие операторы – ткните носом 🙂

Так называемая схема БезВПН:
Идентификация пользователя в данном случае производится на основе его IP адреса, который необходимо защитить от подмены
Почти все эти схемы могут успешно использоваться в сетях со статическими IP адресами или в случае использования DHCP

1) IP-Mac-Binding, чаще всего используется в сетях построенных на коммутаторах D-Link. В данном случае средствами коммутатора осуществляется привязка IP адреса и MAC адреса к определенному порту коммутатора (в зависимости от коммутатора и настройки функции могут анализироваться ARP пакеты или TCP/IP пакеты), в случае несовпадения этой привязки MAC адрес пользователя просто блочится на коммутаторе и пакеты от пользователя никуда не идут. При использовании DHCP могут быть нюансы – клиент отправил DHCP запрос, а свитч его заблочил за несовпадение привязки 🙂 Естественно DHCP сервер должен отдавать прописанному маку – конкретный IP. Не совсем дружелюбный способ по отношению к пользователю ибо после смены устройства подключенного в сети измениться и MAC адрес пользователя, т.е пользователю придется звонить в саппорт оператора и просить изменить MAC адрес привязки

2) Привязка MAC адреса к порту
Такой метод привязки пользователя к порту тоже используется но не часто.
Алгоритм простой, просто привязывается MAC адрес сетевой карточки клиента к порту коммутатора, от подмены IP адресов не спасает, зато доставляет головную боль клиенту и оператору.

3) Статическая ARP таблица (на маршрутизаторе или коммутаторе 3-го уровня), очень часто используется при использовании неуправляемых коммутаторов на уровне доступа
При данной привязке пользователя к порту в ARP таблице на маршрутизаторе или коммутаторе за конкретным IP пользователя закрепляется его MAC адрес, метод тоже неудобный для пользователя + существует вероятность того что умный пользователь все-таки сможет выйти под чужим IP адресом, просто сменив MAC адрес своей сетевой карточки, такая привязка обходится за 2 минуты 🙂
Возможна вариация со статической ARP таблицей и привязкой определенного MAC-а к порту коммутатора, этот способ более грамотен чем просто статический ARP или простая привязка MAC-а на порт и следовательно более секурна, т.к в данном случае клиент то IP сменить свой может, а вот подставить чужой MAC адрес – нет.

4) Привязка пользователя к порту с помощью ACL (access control list) коммутатора, используется в моем случае. Немного неудобный для оператора способ привязки пользователя, но самый дружелюбный к нему. При данной привязке на коммутаторе создаются правила вида:
— — Разрешить
— — Запретить
Данный способ удобен тем – что пользователь может сколько угодно сменять MAC
Адрес и получать доступ в сеть, но при смене своего IP – коммутатор его не
Пропустит

5) По своему VLAN-у на пользователя
Как таковой привязки пользователя нету, просто пользователю выделяется свой VLAN и своя сеть, а там он в нем пусть творит что хочет :). Ресурсоемкий и имхо не совсем удобный метод, но красивый. Чаще всего используется для Юридических клиентов

6) Различные Web Based и 802.1x привязки – можно даже не рассматривать. В данном случае клиент идентифицируется по связке login/password и на основании этих данных выпускается в сеть. От метода VPN отличается только тем что нет необходимости поднимать VPN туннель

7) Отсутствие привязки вообще.
Существует и такой метод и даже где-то используется, но нету никаких гарантий
что пользователи начнут мешать друг другу и воровать Интернет методом смены
своего IP на IP соседа, хотя в наш век безлимиток вполне доступен для жизни

Источник

Читайте также:  Изменить ip адрес linux командная строка
Оцените статью
Adblock
detector