+ Responder ao Tópico



  1. #1

    Padrão ipfw com controle de MAC

    Ola pessoal existe a possibilidade de controlar MAC no IPFW ja tentei de todo o tipo e nao consegui fazer funcionar...

    Valeu

  2. #2

    Padrão

    Isso resolve

    $IPFW add allow layer2 not mac-type ip

    $IPFW add allow layer2 src-ip 192.168.0.2 mac any 00:05:9e:81:7b:69
    $IPFW add allow layer2 dst-ip 192.168.0.2 mac 00:05:9e:81:7b:69 any
    $IPFW add allow all from 192.168.0.2 to any not layer2
    $IPFW add allow all from any to 192.168.0.2 not layer2

  3. #3

    Smile controle de mac com ipfw

    eu uso desta forma e funciona blz.
    # Cliente: Cliente 1

    ipfw add 1 allow layer2 src-ip 192.168.0.1 mac any 00:11:09:d9:3f:6b in via rl0

    # Cliente: Cliente 2

    ipfw add 104 allow layer2 src-ip 10.1.1.2 MAC any 00:0b:d0:fe:00:d1 in via rl0

    # Cliente: Cliente 3

    ipfw add 5 allow layer2 src-ip 100.1.1.2 MAC any 00:0A:52:00:88:2D in via rl0

  4. #4

    Padrão

    que tipo de controle vc quer ?? blqueio banda??

  5. #5

    Padrão

    Galera tenho configurado um servidor com freebsd 5.4 com pppoe+radius, com natd,controle de banda e volume, gostaria de implementar mais o controle por mac address, meu script de firewall segue abaixo, gostaria de algumas opiniões em relacão ao mesmo e tambem se acaso precisarei alterar o sysctl.

    #!/bin/sh

    # Desativando passagem unica
    /sbin/ipfw disable one_pass

    # Limpando as chains existentes
    /sbin/ipfw -f flush

    # Bloqueando NetBios
    /sbin/ipfw add 100 deny log all from any 135-139,445 to any
    /sbin/ipfw add 101 deny log all from any to any 135-139,445

    # Não permitir navegacão a macs não cadastrados
    /sbin/ipfw add allow layer2 not mac-type ip

    # Liberando acesso a gatoseco
    /sbin/ipfw add allow layer2 src-ip 192.168.0.2 mac any 00:05:9e:81:7b:69
    /sbin/ipfw add allow layer2 dst-ip 192.168.0.2 mac 00:05:9e:81:7b:69 any
    /sbin/ipfw add allow all from 192.168.0.2 to any not layer2
    /sbin/ipfw add allow all from any to 192.168.0.2 not layer2

    # Liberando banda a gatoseco
    /sbin/ipfw add 1 pipe 1 tcp from any to 192.168.0.2 out
    /sbin/ipfw add 1 pipe 2 tcp from 192.168.0.2 to any in
    /sbin/ipfw pipe 2 config bw 128kbit/s queue 10kbytes
    /sbin/ipfw pipe 3 config bw 64kbit/s queue 10kbytes


    # Fecha o resto
    /sbin/ipfw add 1 pipe 4 tcp from any to 192.168.0.0:255.255.255.0 out
    /sbin/ipfw add 1 pipe 5 tcp from 192.168.0.0:255.255.255.0 to any in
    /sbin/ipfw pipe 4 config bw 1bit/s queue 10kbytes
    /sbin/ipfw pipe 5 config bw 1bit/s queue 10kbytes


    Abracão

  6. #6

    Padrão

    No radius vc pode definir o MAC Address que pode autenticar no usuario.

    Se nao me engano é o Calling-Station-ID.