Author Topic: network redirection  (Read 4906 times)

iberium

  • Veteran
  • ***
  • Posts: 84
    • View Profile
    • Innovative Sight & Sound
network redirection
« on: April 24, 2013, 02:11:34 am »
Something that I have noticed that is quite annoying is that when I try to go to a site that uses dyndns or a port that is forwarded to my core,  it automatically redirects me to the core.  So if I'm at home and trying to connect to a remote site for work and they use dyndns, then i get directed to my core instead of theirs.  The only way I have been able to get around itis to remote desktop into a remote site that does not use this and then do my work over that.  It is also doing it for any ports that I might need to connect to,  I can't use them if im using them at my location.

iberium

  • Veteran
  • ***
  • Posts: 84
    • View Profile
    • Innovative Sight & Sound
Re: network redirection
« Reply #1 on: May 04, 2013, 01:50:16 pm »
Since I'm guessing this isn't fixable,  how can I modify the dhcp server to use a different router?  It really sucks having to go through a remote desktop just to go to sites that use ports that I have forwarded.

essem_9

  • Regular Poster
  • **
  • Posts: 31
  • Fascinated by LMCE
    • View Profile
Re: network redirection
« Reply #2 on: May 05, 2013, 08:55:53 pm »
iberium,
I have a different router that connects to my Internet and LMCE. The router has two IP addresses one through my cable modem and another via LMCE. So my router for example gets an IP address 192.168.80.150/24.

On LMCE I have created a static route to the destination. Test it out with:
sudo ip r a 1.1.1.1/24 via 192.168.80.150

where 1.1.1.1/24 is the destination and 192.168.80.150 is your secondary router on the same LAN as LMCE. Since the router is connected to the Internet as well it NAT's out the packets just like LMCE would do.

One thing I have noticed, if you make any changes to the DHCP server file or network interfaces file, they can get overridden if you make any changes via the admin site. I think there are scripts that re-write whole file.

If the ip r command works we can add it in the /etc/network/interfaces file and hopefully it persists.




iberium

  • Veteran
  • ***
  • Posts: 84
    • View Profile
    • Innovative Sight & Sound
Re: network redirection
« Reply #3 on: May 08, 2013, 01:35:15 am »
so how is this wired?  for instance,  are you running 1 nic on your core and have the router plugged into your modem or do you still have both nics setup and have the second one setup to route to the router?  i guess what i am trying to get at is:  does it still use the core as the dhcp and then just forwards all requests over the static route to the router bypassing the core firewall?  this would work fine as i would rather use my firebox as my router without losing the device detection functionality.  also, would i need to setup the static router of 1.1.1.1 on my router also?  thanks for the help

essem_9

  • Regular Poster
  • **
  • Posts: 31
  • Fascinated by LMCE
    • View Profile
Re: network redirection
« Reply #4 on: May 29, 2013, 05:56:47 am »
My cable modem connects to a firewall. All traffic passes through this firewall. Behind the firewall i have a Layer 3 switch. This layer 3 switch has two networks (VLANs). Outside VLAN (VLAN2) which connects to LinuxMCE's external interface (eth0). This VLAN gets IP address from the firewall. An inside VLAN (VLAN80) which connects to LinuxMCE's internal subnet (192.168.80.x/24).

On LMCE I have changed the DHCP server scope on the internal subnet to start from 192.168.80.10. I have given my L3 switch a static IP address 192.168.80.2/24 on VLAN80. Any packets sent to VLAN80 of Layer 3 switch gets NAT'ed to VLAN2. So basically my L3 switch and LMCE are configured similarly.

When a client connects to the LMCE network (VLAN80) it gets an IP address from LMCE. Also LMCE is the default gateway. The static route can ensure that LMCE does not NAT the packet but passes it to the Layer3 switch which NATs it out.

Hope this helps!