3

I have Ubuntu 12.04 with two network cards. Because of the security of my organization, I need to use one to connected it to the traffic within a network 10...*, and the other one to have internet access.

If I open network manager and select "Use this connection only for resources in your network" everyting goes fine... until...

My IP in that server is 10.5.24.* so if someone with the IP 10.5.. tries to connect to the server, it won't answer, cause that network can only be reached if you have one ip within 10.5. How can I add one route in the network manager to answer to 10...*?

Thanks in advance for your help!

EDIT

@david-go This is my current configuration:

IP Address: 10.58.24.35
Broadcast: 10.58.31.255
Subnet Mask: 255.255.248.0
Gateway: 10.58.24.1
DNS: 10.58.8.101

If I checked the checkbox "Use this connection only for resources in your network" everyone in the network 10.58.24.* can reach the server, but the problem is when someone in the network, for example: 10.58.7.* tries to see it. As "my network" is 10.58.24.* then the server does not answer the request.

EDIT 2

Info: from (/sbin/ifconfig;/sbin/route -n)

eth0      Link encap:Ethernet  direcciónHW 18:03:73:d6:f8:bf  
          Direc. inet:10.58.24.35  Difus.:10.58.31.255  Másc:255.255.248.0
          Dirección inet6: fe80::1a03:73ff:fed6:f8bf/64 Alcance:Enlace
          ACTIVO DIFUSIÓN FUNCIONANDO MULTICAST  MTU:1500  Métrica:1
          Paquetes RX:4643576 errores:0 perdidos:0 overruns:0 frame:0
          Paquetes TX:1981118 errores:0 perdidos:0 overruns:0 carrier:0
          colisiones:0 long.colaTX:1000 
          Bytes RX:1035692649 (1.0 GB)  TX bytes:1286344748 (1.2 GB)
          Interrupción:20 Memoria:e1a00000-e1a20000 

lo        Link encap:Bucle local  
          Direc. inet:127.0.0.1  Másc:255.0.0.0
          Dirección inet6: ::1/128 Alcance:Anfitrión
          ACTIVO BUCLE FUNCIONANDO  MTU:16436  Métrica:1
          Paquetes RX:876450 errores:0 perdidos:0 overruns:0 frame:0
          Paquetes TX:876450 errores:0 perdidos:0 overruns:0 carrier:0
          colisiones:0 long.colaTX:0 
          Bytes RX:136458162 (136.4 MB)  TX bytes:136458162 (136.4 MB)

wlan0     Link encap:Ethernet  direcciónHW 00:14:d1:21:a7:73  
          Direc. inet:172.16.115.133  Difus.:172.16.119.255  Másc:255.255.248.0
          Dirección inet6: fe80::214:d1ff:fe21:a773/64 Alcance:Enlace
          ACTIVO DIFUSIÓN FUNCIONANDO MULTICAST  MTU:1500  Métrica:1
          Paquetes RX:64840 errores:0 perdidos:113 overruns:0 frame:0
          Paquetes TX:880 errores:0 perdidos:6 overruns:0 carrier:0
          colisiones:0 long.colaTX:1000 
          Bytes RX:9839656 (9.8 MB)  TX bytes:195993 (195.9 KB)

Tabla de rutas IP del núcleo
Destino         Pasarela        Genmask         Indic Métric Ref    Uso Interfaz
0.0.0.0         172.16.112.6    0.0.0.0         UG    0      0        0 wlan0
10.58.24.0      0.0.0.0         255.255.248.0   U     1      0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 eth0
172.16.112.0    0.0.0.0         255.255.248.0   U     2      0        0 wlan0

EDIT 3

This is the result for lspci:

lspci
00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09)
00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 (rev 04)
00:16.3 Serial controller: Intel Corporation 6 Series/C200 Series Chipset Family KT Controller (rev 04)
**00:19.0 Ethernet controller: Intel Corporation 82579LM Gigabit Network Connection (rev 04)**
00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 04)
00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 (rev b4)
00:1c.2 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 3 (rev b4)
00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 04)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev a4)
00:1f.0 ISA bridge: Intel Corporation Q65 Express Chipset Family LPC Controller (rev 04)
00:1f.2 SATA controller: Intel Corporation 6 Series/C200 Series Chipset Family SATA AHCI Controller (rev 04)
00:1f.3 SMBus: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller (rev 04)

And lsusb

lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
**Bus 001 Device 007: ID 0bda:8172 Realtek Semiconductor Corp. RTL8191SU 802.11n WLAN Adapter**
Bus 002 Device 003: ID 046d:c05a Logitech, Inc. Optical Mouse M90
Bus 002 Device 004: ID 413c:2107 Dell Computer Corp. 
13
  • To help solve your problem you really need to provide more in-depth information (particularly the IP addresses and network setup). It sounds like you need to do source-based routing - which is a bit of a pain - but it might well be that there are other solutions - but we don't know untul you know your setup.
    – davidgo
    Feb 15, 2013 at 4:45
  • @davidgo I already added the information. Feb 20, 2013 at 15:02
  • Please can you add the output of "/sbin/ifconfig" and "/sbin/route -n", as I'm still unclear what you are saying and how your computer is behaving. (You can get create a file with this information by opening a terminal window and typing "(/sbin/ifconfig;/sbin/route -n) > filename.txt" which will store the info I need in a file you can copy and paste or upload.
    – davidgo
    Feb 20, 2013 at 19:23
  • @davidgo Done! It is the result of (/sbin/ifconfig;/sbin/route -n) Feb 20, 2013 at 22:39
  • I still don't fully understand how things should be working, but I can see that you only have 1 Network card (eth0) configured. I think the solution will be to configure the second network card on the 10.5.24 network. I have no idea how you would do this through a GUI (but I can do it through startup scripts or terminal commands). Do you know for sure if your second network card is eth1, and if that card is actually working ? (There is no indication of it in your output)
    – davidgo
    Feb 21, 2013 at 1:56

1 Answer 1

2

Finally I was able to accomplished this. I've to add to routes:

route add -net 10.0.0.0 netmask 255.0.0.0 gw 10.58.24.1 eth0

That make everything in 10.0.0.0 go through eth0; and:

route add -net 0.0.0.0 netmask 0.0.0.0 gw 172.16.112.6 wlan0

That makes everything else go through wlan0

1
  • 1
    Thx, you saved my life :-). Sep 26, 2014 at 22:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .