Author Topic: Access file server on external network  (Read 12388 times)

slice16

  • Regular Poster
  • **
  • Posts: 19
    • View Profile
Access file server on external network
« on: May 29, 2009, 01:10:16 am »
Hi All,

I am just wondering whether it is possible to map (and set to store) data that sits on the other side of your external NIC?

I know this sounds a little silly, but my network is in two segments, 1 is my main PC network (192.168.2.0/24) which my LMCE box external nic connects to. I then have my LMCE network (192.168.80.0/24). All my mds etc are on the lmce side. I do have a large file server sat in my main network. Am I able to map this to LMCE without moving it over?

itspac

  • Veteran
  • ***
  • Posts: 136
    • View Profile
Re: Access file server on external network
« Reply #1 on: May 29, 2009, 01:16:15 am »
I use a file server on the external network of my lmce box. I just have to add the file server address and MAC usinf the web admin. Then I reload router and let lmce do the rest

Btw I disable the firewall on lmce

Pnuts

  • Veteran
  • ***
  • Posts: 130
    • View Profile
Re: Access file server on external network
« Reply #2 on: May 29, 2009, 01:17:06 am »
Your best option would be to move it over... Move everything over.

However, as long as your only going from internal to external, you should still be able to access everything on the external NIC directly by IP, possibly by name depending on how your router is setup.

You shouldnt even need to port forward or do some type of configuration if your trying to go from external to internal networks.

ivanp

  • Veteran
  • ***
  • Posts: 94
    • View Profile
Re: Access file server on external network
« Reply #3 on: May 29, 2009, 01:36:40 am »

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: Access file server on external network
« Reply #4 on: May 29, 2009, 01:43:04 am »
It is possible, but don't do it! Just move the machine into the internal network, you are trying to swim upstream for no reason....

See here for an explanation as to why it is perfectly possible to run internal and external networks with hosts on them, but realistically there is NO reason to do so!

http://wiki.linuxmce.org/index.php/Network_Setup

Marie.O

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 3676
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: Access file server on external network
« Reply #5 on: May 29, 2009, 09:04:47 am »
I use a file server on the external network of my lmce box. I just have to add the file server address and MAC usinf the web admin. Then I reload router and let lmce do the rest

itspac, if you have done, what you wrote, your system would not be working!

DO NOT ADD THE MAC ADDRESS OF AN OUTSIDE SYSTEM, or you will screw up your dhcpd.conf file to the point where it won't allow dhcpd to start.

IP-address alone works fine and dandy. btdt and still doing it.

slice16

  • Regular Poster
  • **
  • Posts: 19
    • View Profile
Re: Access file server on external network
« Reply #6 on: June 07, 2009, 06:51:10 pm »
Hi All,

Sorry for the long delay in my reply (teach me not to pay the phone bill :) ). Thanks for the replys, I will get this setup now.

I am wanting to keep the two networks separate is mostly down to me using smoothwall and do not want to setup a double NAT (smoothwall is running a vpn connection to a few of the families houses). I just don't like the idea of lmce been my main gateway to the internet, and would like to be able to shutdown without everything else loosing connectivity.

itspac

  • Veteran
  • ***
  • Posts: 136
    • View Profile
Re: Access file server on external network
« Reply #7 on: June 07, 2009, 10:55:23 pm »
Btw. My system does work. Don't know why. But it does

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: Access file server on external network
« Reply #8 on: June 07, 2009, 11:54:16 pm »
If you PROPERLY set things up, your core stays up.

*hmm*

why do you guys fight this?

Just set it up like we tell you to, and stuff works, and it works well.

"nooo, i'm a control freak, and I want to control __EEEVERYTHING___"

Fine, augment Smoothwall onto your lmce core after you set it up. But let the core be the center of the network. The system works better for it, and you'll have access to all the features.

-Thom

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: Access file server on external network
« Reply #9 on: June 07, 2009, 11:59:13 pm »
To emphasise one of Thom's points - the core is designed to be left on permanently. If you intend to be turning it on and off as needed, then you are setting yourself up for failure as you will need to reengineer the system. Work with the idea that the core stays on, and you will have no issue.

itspac

  • Veteran
  • ***
  • Posts: 136
    • View Profile
Re: Access file server on external network
« Reply #10 on: June 10, 2009, 01:37:17 pm »
I listen to what you guys say..   all i can say is that if i use my free will and setup things outside  of the recommended way... i don't ask you for help with it if/when i have problems...


totallymaxed

  • LinuxMCE God
  • ****
  • Posts: 4660
  • Smart Home Consulting
    • View Profile
    • Dianemo - at home with technology
Re: Access file server on external network
« Reply #11 on: June 10, 2009, 01:51:08 pm »
I listen to what you guys say..   all i can say is that if i use my free will and setup things outside  of the recommended way... i don't ask you for help with it if/when i have problems...



Sounds a fair position to me ;-)

Andrew
Andy Herron,
CHT Ltd

For Dianemo/LinuxMCE consulting advice;
@herron on Twitter, totallymaxed+inquiries@gmail.com via email or PM me here.

Get Dianemo-Rpi2 ARM Licenses http://forum.linuxmce.org/index.php?topic=14026.0

Get RaspSqueeze-CEC or Raspbmc-CEC for Dianemo/LinuxMCE: http://wp.me/P4KgIc-5P

Facebook: https://www.facebook.com/pages/Dianemo-Home-Automation/226019387454465

http://www.dianemo.co.uk

Marie.O

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 3676
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: Access file server on external network
« Reply #12 on: June 10, 2009, 09:07:07 pm »
itspac,

I use a file server on the external network of my lmce box. I just have to add the file server address and MAC usinf the web admin. Then I reload router and let lmce do the rest

I listen to what you guys say..   all i can say is that if i use my free will and setup things outside  of the recommended way... i don't ask you for help with it if/when i have problems...

That's fine with me. The only thing I do not understand is, you are saying you plugged in the MAC address and IP address of your outside NAS system. And you do not have a problem. That seems strange, as each time I added the mac address AND ip address, it would screw DHCP after I added a new MD. Could you post your /etc/dhcpd.conf file maybe together with mac address of your external NAS? I'd like to take a look at the details.

Thanks

itspac

  • Veteran
  • ***
  • Posts: 136
    • View Profile
Re: Access file server on external network
« Reply #13 on: June 17, 2009, 12:38:59 am »
itspac,

I use a file server on the external network of my lmce box. I just have to add the file server address and MAC usinf the web admin. Then I reload router and let lmce do the rest

I listen to what you guys say..   all i can say is that if i use my free will and setup things outside  of the recommended way... i don't ask you for help with it if/when i have problems...

That's fine with me. The only thing I do not understand is, you are saying you plugged in the MAC address and IP address of your outside NAS system. And you do not have a problem. That seems strange, as each time I added the mac address AND ip address, it would screw DHCP after I added a new MD. Could you post your /etc/dhcpd.conf file maybe together with mac address of your external NAS? I'd like to take a look at the details.

Thanks

I can do that.. problem is...  Im in the process of moving. I wont get everything and connected until beginning of July..

NikAmi

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Access file server on external network
« Reply #14 on: June 24, 2009, 10:52:42 am »
No...you don't have to place your PC inside the LinuxMCE network and I most definitely wouldn't. I don't claim to know what I'm talking about all that well, but in my mind what you need to do is establish a static route for the information to go through. To do this, your outside and inside networks should ideally be on separate subnets and address spaces. For examples sake, lets make the external network use IPs in the 192.168.1.X range and be on the 255.255.255.0 subnet and lets mate the LinuxMCE internal network be on he 192.168.0.X address space and be on the 255.255.249.0 address space. Here's where it gets tricky and I have had problems in the past between various distros/devices/OS. You need to set up a static route that directs all traffic headed to ("destination") 192.168.1.0 through the external interface ("gateway") Try one of the three options:
  • Use the IP address assigned to the Core's external NIC as the gateway
  • Use 0.0.0.0 as the gateway
  • Use "default" as the gateway
Make sure to set the subnet (or netmask) to 255.255.255.0 and select the correct interface. This tip comes from my experience with Linux in general and not just LinuxMCE although it should be equally applicable.

If there is no GUI to do this, try entering the following (adjust the address/device for your setup) into a console:

ip route add to 192.168.1.0 dev eth0 (might be 192.168.1.0/24)

Keep in mind that the preceding command will be erased when the system is rebooted. To make this permanent, you must edit the /etc/network/interfaces file and add:

post-up ip route add to 192.168.1.0 dev eth0 (might be 192.168.1.0/24)

Edit: Upon further research into the topic, it appears you may keep the subnet masks the same without any problems and it may be beneficial to do so as there are some weird calculations performed in binary to determine certain address information. Experiment with it and see what works.
« Last Edit: June 24, 2009, 11:27:17 am by NikAmi »