Questão sobre Rede e redireccionamento de tráfego.

v0rlon

Power Member
Bô note! :D

Tudo bem pessoal?

Gostaria de vos apresentar a minha dificuldade:

- Tenho router USR 9105 e pretendo controlar trafego de alguns pcs aqui como tal gostava de pode redireccionar todo o trafego de uma ou duas maquinas aqui para o meu pc.

Como é que faço isto? Nao uso DHCP pelo que sei quais sao as maquinas que queria controlar todo o trafego.

Obrigado :)
 
Pois tb ja tinha pensado nisso...mas como estou a ser um bocado teimoso ehehe. De qq forma ja pesquisei bastante no google e o que encontrei é o Port Mirroring que é mais usado em Switchs mas como um router/modem adsl ja tem isto supostamente eu devia conseguir configurar isto.

O meu router permite configurar tabelas de routeamento será por aqui? já tentei mexer mas sem efeitos.
 
Entao é assim eu tive a ver e consigo configurar tabelas de routeamento da seguinte forma:



Código:
 SYNOPSIS

    route add <ipaddress> <subnetmask> <[<gateway>] [<interface>]>

    route delete <ipaddress> <subnetmask>

    route show

    route --help

DESCRIPTION

route manipulates the IP routing table. Its primary use is to set up static routes to specific hosts or networks via an interface.

When the add or delete options are used, route modifies the routing tables. Show option displays the current contents of the routing tables.

Note default gateway route should use another “defaultgateway” command. If 0.0.0.0 is entered using route add command, it is treated the same as a static default gateway where a subnetmask must be entered.

COMMANDS

add

    add a new route entry

delete

    delete a route entry

show

    show current content of routing table including static and dynamic route entries

OPTIONS

ipaddress

    the destination network or host IP address in dotted decimal notation.

subnetmask

    when adding a network route, the netmask must be specified. Target address must have zero matching with the zero portion in NM. Otherwise, command will fail and display message “netmask doesn't match route address”

gateway

    route packets via a gateway.

    NOTE: The specified gateway must be reachable first. This usually means that you have to set up a static route to the gateway beforehand. If you specify the address of one of your local interfaces, it will be used to decide about the interface to which the packets should be routed to.

interface

    force the route to be associated with the specified device, as the kernel will otherwise try to determine the device on its own by checking already existing routes and devices.

EXAMPLES

    * add a route to the network 192.56.76.x via "br0" interface.
      route add 192.56.76.0 255.255.255.0 br0

    * add route to the gateway 10.6.33.129 for network 192.57.66.x.
      route add 192.57.66.0 255.255.255.0 10.6.33.129

OUTPUT

The output of the kernel routing table is organized in the following columns

Destination

    The destination network or destination host.

Gateway

    The gateway address or * if none set.

Genmask

    The netmask for the destination net; 255.255.255.255 for a host destination and 0.0.0.0 for the default route.

Flags Possible flags include

    U (route is up)
    H (target is a host)
    G (use gateway)
    R (reinstate route for dynamic routing)
    D (dynamically installed by daemon or redirect)
    M (modified from routing daemon or redirect)



Adicionei um pc supostamente a redirectcionar para o meu assim:

route add 192.168.1.4 255.255.255.255 192.168.1.2 (este o meu ip)

acontece que agora nem sequer consigo eliminar a entrada e o pc ficou sem net acabei por lhe mudar o ip para nao fazer já um reset ao router.
 
Entao é assim eu tive a ver e consigo configurar tabelas de routeamento da seguinte forma:



Código:
 SYNOPSIS

    route add <ipaddress> <subnetmask> <[<gateway>] [<interface>]>

    route delete <ipaddress> <subnetmask>

    route show

    route --help

DESCRIPTION

route manipulates the IP routing table. Its primary use is to set up static routes to specific hosts or networks via an interface.

When the add or delete options are used, route modifies the routing tables. Show option displays the current contents of the routing tables.

Note default gateway route should use another “defaultgateway” command. If 0.0.0.0 is entered using route add command, it is treated the same as a static default gateway where a subnetmask must be entered.

COMMANDS

add

    add a new route entry

delete

    delete a route entry

show

    show current content of routing table including static and dynamic route entries

OPTIONS

ipaddress

    the destination network or host IP address in dotted decimal notation.

subnetmask

    when adding a network route, the netmask must be specified. Target address must have zero matching with the zero portion in NM. Otherwise, command will fail and display message “netmask doesn't match route address”

gateway

    route packets via a gateway.

    NOTE: The specified gateway must be reachable first. This usually means that you have to set up a static route to the gateway beforehand. If you specify the address of one of your local interfaces, it will be used to decide about the interface to which the packets should be routed to.

interface

    force the route to be associated with the specified device, as the kernel will otherwise try to determine the device on its own by checking already existing routes and devices.

EXAMPLES

    * add a route to the network 192.56.76.x via "br0" interface.
      route add 192.56.76.0 255.255.255.0 br0

    * add route to the gateway 10.6.33.129 for network 192.57.66.x.
      route add 192.57.66.0 255.255.255.0 10.6.33.129

OUTPUT

The output of the kernel routing table is organized in the following columns

Destination

    The destination network or destination host.

Gateway

    The gateway address or * if none set.

Genmask

    The netmask for the destination net; 255.255.255.255 for a host destination and 0.0.0.0 for the default route.

Flags Possible flags include

    U (route is up)
    H (target is a host)
    G (use gateway)
    R (reinstate route for dynamic routing)
    D (dynamically installed by daemon or redirect)
    M (modified from routing daemon or redirect)



Adicionei um pc supostamente a redirectcionar para o meu assim:

route add 192.168.1.4 255.255.255.255 192.168.1.2 (este o meu ip)

acontece que agora nem sequer consigo eliminar a entrada e o pc ficou sem net acabei por lhe mudar o ip para nao fazer já um reset ao router.

faz reboot ao pc onde meteste essa rota
 
Back
Topo