Results 1 to 9 of 9

Thread: specify client network interface to mount cifs share

  1. #1
    Join Date
    Aug 2008
    Location
    Paris, France
    Beans
    132
    Distro
    Kubuntu 10.10 Maverick Meerkat

    Question specify client network interface to mount cifs share

    Hi,

    I've a server that has two network interface eth0 and eth1 and need to mount a filesystem with CIFS on a remote server.

    On client :
    eth0 is used for http
    eth1 is used for samba mount.


    I've set some rules on the server in firewall and samba config to allow only the ip of eth1 of the client.


    How can I eplicitely force the client machine to use its eth1 network interface for the samba mount ?


    On many command, you can specify the network interface...

    however, in man mount.cifs, I can find any relevant option to put it in the fstab.

    Thomas.
    C2D 6420, 4GB GSkill Ram, Geforce 8800GTX ASUS, 2*250GB Raid1, 2*150GB WD Raptor RAID0 for win gaming, Dell 24"(1920*1200), Antec P182, Seasonic S12 600HT, Asus P5N32E SLI Plus
    Ubuntu Servers 10.10 : 10 (of webagency company : www.123monsite.com)

  2. #2
    Join Date
    Aug 2008
    Location
    Paris, France
    Beans
    132
    Distro
    Kubuntu 10.10 Maverick Meerkat

    Question Re: specify client network interface to mount cifs share

    I've talked with some colleague and one told be that it would be possible with iptable to create a route that forces the traffic that goes to a particular ip on some specific port to use eth1 instead of eth0.

    Any idea of how to write such rules ?

    I don't know iptable at all (I use ufw for the firewall, it's simple and fill my needs

    Thomas.
    C2D 6420, 4GB GSkill Ram, Geforce 8800GTX ASUS, 2*250GB Raid1, 2*150GB WD Raptor RAID0 for win gaming, Dell 24"(1920*1200), Antec P182, Seasonic S12 600HT, Asus P5N32E SLI Plus
    Ubuntu Servers 10.10 : 10 (of webagency company : www.123monsite.com)

  3. #3
    Join Date
    Feb 2005
    Location
    Melbourne, Australia
    Beans
    13,510
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: specify client network interface to mount cifs share

    Quote Originally Posted by mansonthomas View Post
    Hi,

    I've a server that has two network interface eth0 and eth1 and need to mount a filesystem with CIFS on a remote server.

    On client :
    eth0 is used for http
    eth1 is used for samba mount.


    I've set some rules on the server in firewall and samba config to allow only the ip of eth1 of the client.


    How can I eplicitely force the client machine to use its eth1 network interface for the samba mount ?


    On many command, you can specify the network interface...

    however, in man mount.cifs, I can find any relevant option to put it in the fstab.

    Thomas.
    Put the two interfaces on different subnets, set up manual routes to the remote range and the mount will use whatever interface you have configured to access that remote IP address.
    Regards, David.
    Please use the Forum search and Wiki search for immediate help
    Please mark your thread as Solved when appropriate
    New to technical forums?: How To Ask Questions The Smart Way

  4. #4
    Join Date
    Aug 2008
    Location
    Paris, France
    Beans
    132
    Distro
    Kubuntu 10.10 Maverick Meerkat

    Exclamation Re: specify client network interface to mount cifs share

    I can't do that, IP addresses are attributed by the hosting company and can't be changed.
    C2D 6420, 4GB GSkill Ram, Geforce 8800GTX ASUS, 2*250GB Raid1, 2*150GB WD Raptor RAID0 for win gaming, Dell 24"(1920*1200), Antec P182, Seasonic S12 600HT, Asus P5N32E SLI Plus
    Ubuntu Servers 10.10 : 10 (of webagency company : www.123monsite.com)

  5. #5
    Join Date
    Aug 2008
    Location
    Paris, France
    Beans
    132
    Distro
    Kubuntu 10.10 Maverick Meerkat

    Re: specify client network interface to mount cifs share

    in fact, the two ethernet interfaces are on different subnet, so I'll try that.
    C2D 6420, 4GB GSkill Ram, Geforce 8800GTX ASUS, 2*250GB Raid1, 2*150GB WD Raptor RAID0 for win gaming, Dell 24"(1920*1200), Antec P182, Seasonic S12 600HT, Asus P5N32E SLI Plus
    Ubuntu Servers 10.10 : 10 (of webagency company : www.123monsite.com)

  6. #6
    Join Date
    May 2006
    Location
    Amsterdam
    Beans
    1,731
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: specify client network interface to mount cifs share

    man route
    Upgrade Ubuntu | Upgrade unsupported Ubuntu versions | Always backup | Howto upgrade flash
    Minimal CD install | Remove old kernels | My blog | Linux user #462801 | Conscience doth make cowards of us all. -- Shakespeare

  7. #7
    Join Date
    Aug 2008
    Location
    Paris, France
    Beans
    132
    Distro
    Kubuntu 10.10 Maverick Meerkat

    Re: specify client network interface to mount cifs share

    >man route

    a post that add absolute no value to this thread...
    Last edited by mansonthomas; November 19th, 2009 at 06:54 PM.
    C2D 6420, 4GB GSkill Ram, Geforce 8800GTX ASUS, 2*250GB Raid1, 2*150GB WD Raptor RAID0 for win gaming, Dell 24"(1920*1200), Antec P182, Seasonic S12 600HT, Asus P5N32E SLI Plus
    Ubuntu Servers 10.10 : 10 (of webagency company : www.123monsite.com)

  8. #8
    Join Date
    May 2006
    Location
    Amsterdam
    Beans
    1,731
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: specify client network interface to mount cifs share

    Quote Originally Posted by mansonthomas View Post
    >man route

    a post that add absolute no value to this thread...
    So you didn't execute the command, so you didn't see how to create static routes...
    Upgrade Ubuntu | Upgrade unsupported Ubuntu versions | Always backup | Howto upgrade flash
    Minimal CD install | Remove old kernels | My blog | Linux user #462801 | Conscience doth make cowards of us all. -- Shakespeare

  9. #9
    Join Date
    Aug 2008
    Location
    Paris, France
    Beans
    132
    Distro
    Kubuntu 10.10 Maverick Meerkat

    Re: specify client network interface to mount cifs share

    like I said... no value added...

    man whatever you want, google whatever you want is not a usable answer...
    C2D 6420, 4GB GSkill Ram, Geforce 8800GTX ASUS, 2*250GB Raid1, 2*150GB WD Raptor RAID0 for win gaming, Dell 24"(1920*1200), Antec P182, Seasonic S12 600HT, Asus P5N32E SLI Plus
    Ubuntu Servers 10.10 : 10 (of webagency company : www.123monsite.com)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •