Tuesday, July 10, 2012

Routing the sh*t out of it

Here's a story why I will never have Linux on my machines at home. Maybe there'll be one exception: when my external hard drives are full I'm going to build a file server. These external boxes are slow and expensive and worthless.

So I have a web application that needs two IP addresses. Certain things are only available on one NIC (Network Interface Controller) why other stuff is only available on the other NIC. Don't argue with this. Smart people thought this is the way to go, so be it.

Now my machine (virtual) happens to be on DHCP on a server under my desk. These under-desk servers are on a separate switch as the development desktops. I realized that I can't access this VM (virtual machine) on its second IP but only the first one. From my server and from other's server I had no problem pinging this second IP thgouh. Strange... Google-ing and talking to people with more advanced sysadmin background I learned something new: since subnet is blahblahblah, and the correlation of the stars and the universe is expanding Linux for questions on NIC#2 answers on NIC#1. It's like someone gives you a call on your mobile and you answer the call with your land-line phone... Probably there's a logic to it, which I'm not worthy to understand.

So after all this misery I've found a website that explains what to do. Quite complicated, but I started doing this. Then when I was about to create a second routing table and tried to figure out what to type in there based on the example on that website it came to my mind that there has to be a better way. It's the 21st century for god's sake! GUI is the magic word even on Linux!

So I typed 'init 5' opened the GUI console, and some fate has been restored:
  1. Click on the little network icon
  2. Edit connections
  3. Click on eth0 then click on Edit
  4. Click on IPv4 Settings
  5. Click the Routes button
  6. Thick 'Use this connection only for resources on its network'
  7. OK, Apply
  8. Same for eth1
Magic has been done.

No comments:

Post a Comment