[SOLVED] samba - networks issue
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 13 of 13
  1. #1
    Join Date
    May 2009
    Posts
    457
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    samba - networks issue

    I installed fedora 29 as a server for an office of windows clients

    The net modem is provided by Spectrum.
    It has another modem hanging off it which has all the windows machines on it.
    These are wireless and use dynamic IPs.
    (I think Class B is used on this modem as one address is 192.168.0.10)
    The fedora samba server is directly off the Spectrum and is using Class C.
    The address is 192.168.2.1 - weird the gateway is 192.168.2.2).

    Anyway the clients are not seeing the samba service.
    I believe that I may need to do one of two things.

    Do I need to set my netmast to 255.255.0.0 (now 255.255.255.0)??
    if so, how do I do that???
    OR
    Do I need to go with dynamic IP and get on the other modem?
    I have never used dynamic IP on a server so have no idea how to do this.
    OR
    Should I be looking at something else entirely?

  2. #2
    Join Date
    Feb 2015
    Location
    Colorado
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: samba - networks issue

    You said you had the fedora 29 server hooked up to the spectrum cable modem. I would not set it up that way. I would have the fedora 29 server attached to the same router as the Windows wireless computers as below. Your spectrum modem does not need to be involved at all. Keep It Simple. Then it is just a matter of properly configuring Samba in the Fedora server.

    Code:
     Spectrum - Internet Service Provider
                ------------------   Spectrum cable modem
                          |
               -------------------  Wireless modem (unknown manufacturer and model)
                          |
            *  *  *  --------       Fedora 29 Server  plus unspecified number of Windows wireless  desktops (represented by *)
    Hope this diagram makes sense. Hard to make a diagram on the forum.
    I try to think, but nothin' happens!

  3. #3
    Join Date
    May 2009
    Posts
    457
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: samba - networks issue

    Thanks. I only did this as I wanted a fixed IP and the people have no idea how to set a fixed IP on the other modem.

    Thanks - makes sense. Perhaps I can do with an assigned IP. Now I need to figure how to make the IP dynamic.
    All the article I found show how to go the other way, and I do not have an example of what the etc/sysconfig/network-scripts/ifcfg-XXX file should look like for dynamic.
    (both my machines use fixed)

    Thanks again.

  4. #4
    Join Date
    Feb 2015
    Location
    Colorado
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: samba - networks issue

    You're Welcome.

    Not only does putting the Fedora server on the wireless router easier, it is safer as the server is now behind two hardware NAT firewalls. One in the Spectrum cable modem, and one in the wireless router. Two is better than one. Plus if you have the firewall in the Fedora server active and set up properly, that makes two hardware firewalls. and one software firewall.

    Perhaps I can do with an assigned IP. Now I need to figure how to make the IP dynamic.
    Remember, this is all based on how I do things, your setup may require alterations to fit your situation. As always do this at your own risk. Myself or Fedora Forums are not responsible for any undesired consequences.

    Usually, the server would have the networking set up to static IP address at installation. With modern routers or switches, you can have a mix of static and dynamic IPs on the same router or switch without messing around with router options etc. During the desktop/server boot up, the desktop notifies the router "hey, I'm here, I'm awake" then the router and desktop/server does handshaking to determine if the desktop/server has a static IP and what that IP is, or if the desktop/server has DHCP enabled in which case the router assigns the desktop's IP. It is actually a lot more complicated than that, but that is a simplified explanation.

    You might want to take a look at this tutorial/howto I wrote on how I set up my personal servers.
    https://pudges-place.ddns.net/Fedora...ora_Server.pdf
    How to set up a static IP address during install is discussed on pages 3 and 4. You can change the server to a static IP post installation by editing a config file.
    I am not 100% sure about changing to a static IP address post install, so try this at your own risk. In a terminal window:

    # ip addr
    Look under entry no. 2. That should be your hardwired ethernet information. It should be labeled either enp3s0 (zero on the end) or eth0 (zero on the end) or something similar.
    That is the name of your physical lan port on the computer back plane. In a terminal, cd to /etc/sysconfig/network-scripts then do a ls -al and you should see a file named ifcfg-enp3s0 or ifcfg-eth0 Anyway ifcfg-YOUR NET INTERFACE NAME If it is set for DHCP (static IP) you should see something similar to this.
    cat ifcfg-enp3s0
    TYPE=Ethernet
    PROXY_METHOD=none
    BROWSER_ONLY=no
    BOOTPROTO=dhcp
    DEFROUTE=yes
    IPV4_FAILURE_FATAL=no
    IPV6INIT=yes
    IPV6_AUTOCONF=yes
    IPV6_DEFROUTE=yes
    IPV6_FAILURE_FATAL=no
    IPV6_ADDR_GEN_MODE=stable-privacy
    NAME=enp3s0
    UUID=575a0365-7ce5-34d5-a41c-eaeb75e8df83
    ONBOOT=yes
    AUTOCONNECT_PRIORITY=-999
    DEVICE=enp3s0

    notice the line
    BOOTPROTO=DHCP

    using vi or nano change this line to
    BOOTPROTO=NONE
    then after the last line, ADD the following
    IPADDR=192.168.0.163
    PREFIX=24
    GATEWAY=192.168.0.1
    DNS1=192.168.0.1
    IPV6_PRIVACY=no
    ZONE=FedoraServer

    you may have to change the values for GATEWAY and DNS1 to match your router's first three triads, and change IPADDR to the actual IP static address you want
    If you do not have the Fedora firewall active, do not add ZONE= If Fedora firewalll is active, enter the following
    # firewall-cmd --get-default-zone (that's two hyphens in the middle)
    FedoraServer

    It should return either FedoraServer or Public. Change ZONE= to whatever default zone the command returned.
    See page 9 for a discussion of the Fedora firewall zones.
    Save the changes. Reboot and hope for the best. As you can see, it is a lot easier to set this up during installation.

    How I set up Samba starts at page 19. It has a tip that allows Samba to ONLY accept requests from a computer ON your router, and no where else
    hosts allow = 127. 192.168.0
    This only allows request from the servers loopback or any IP that starts with the first 3 triads of your router's address. In other words, only computers hooked to your router by wired connections, and I ASSUME wireless connections. Never hooked a computer to my servers by WiFi so I can only assume.
    It also shows how to allow some users access to Samba and not others, or some users can access certain folders and others different folders only. Such as a folder named Accounting can be accessed only by certain users and another folder named Sales can only be accessed by certain users.

    HTH
    I try to think, but nothin' happens!

  5. #5
    Join Date
    May 2009
    Posts
    457
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: samba - networks issue

    1) Thanks - wonderful writeup
    2) I have been using Unix a long time before Fedora and Linux so am used to admin stuff (but doing less, so ...)
    3) I hold no one responsible for my actions but appreciate the help you have given
    4) yes my own router allows me to have both dynamic and static, but I am trying to get my son with a Fedora server in a totally windows environment
    (backup of common files becomes trivial) - he does not know how to set the router to both and I will try to find that out somehow
    failing that, I will go with dynamic, but IMHO - that sucks for a server
    5) I would have been at home with NFS (worked for Sun when it was born), but Samba seems better for his windows folks so I am stumbling along

    Again many thanks and I will be trying to sort this out ASAP - will post solved if I succeed.
    :=]

  6. #6
    Join Date
    May 2009
    Posts
    457
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: samba - networks issue

    oops - I forgot to say the server is fixed IP now by design, that was the reason he wanted it on the Spectrum as it was configured allowing fixed IPs.

    I am hoping to find a way to change the IP to another fixed on the other-modem sub-net (not hard, you showed how and I had figured it out)
    but if I have to make it dynamic, I will (reversing what you showed essentially)
    Yes, I expect pain here, but it should not be that hard - it is all one file controlling it and I will make a backup before changing anything (OK 2 - /etc/hosts changes too)
    Your example of DHCP will be very useful as I do not have a Fedora machine using DHCP - just a printer. My 2 are fixed.
    :=]]]

  7. #7
    Join Date
    Feb 2015
    Location
    Colorado
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: samba - networks issue

    Quote Originally Posted by rholme
    1) Thanks - wonderful writeup
    2) I have been using Unix a long time before Fedora and Linux so am used to admin stuff (but doing less, so ...)
    2. I worked for AT&T for 34 years, so I also started early with Unix in 1975 or 1976 somewhere around there. Back then all CRT terminals were the same size, and only had two options. Amber monochrome screen or Green monochrome screen. Nothing but CLI. Brings back memories of ASCII art.

    1. As the above shows, I am getting older (68 yrs) and my memory isn't what it used to be. I learned long ago that when I invest a lot of time researching how to do something, I take notes as I go then write up a how to for my future benefit. I especially did this at work. Soon my co-workers knew I had them and wanted copies. i was glad to oblige. Now I'm retired and I put my how-tos on my web site. Even if they only help a few people, it's worth it to me.

    Good luck with your project.
    I try to think, but nothin' happens!

  8. #8
    Join Date
    May 2009
    Posts
    457
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: samba - networks issue

    OK Thanks. You are two years younger and started Unix a couple years later than I did. I too take extensive notes and do a lot of research before acting.
    I was an IBM systems programmer before that, then I fell in love with Unix.
    I am trying to get my son's company using a mature OS (without pipe and fork, you ain't adult).

    Again thanks for the help.

  9. #9
    Join Date
    Feb 2005
    Location
    London, UK
    Posts
    945
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Re: samba - networks issue

    I started with Unix 25 odd years ago back in the 90's, you guys make me feel young... so thanks!

  10. #10
    Join Date
    May 2009
    Posts
    457
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: samba - networks issue

    Marking this as solved as Pudge answered my question and more.

    Not yet working right, but I will frame a better question.

  11. #11
    Join Date
    Mar 2018
    Location
    Vermont, USA
    Posts
    82
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: samba - networks issue

    Quote Originally Posted by Pudge
    You might want to take a look at this tutorial/howto I wrote on how I set up my personal servers.
    https://pudges-place.ddns.net/Fedora...ora_Server.pdf
    How to set up a static IP address during install is discussed on pages 3 and 4. You can change the server to a static IP post installation by editing a config file.
    HTH
    I enjoyed going through your document -- I see the MB is ITX - what case did you use ? I like the Cooler Master case - Can u maybe post a picture ? I am considering using an AMD ITX board I have to make a home-grown nas with Fedora Server - will be used primarily as a rsync device for growing music collection .. wld like to use ssd's ideally for their form factor (and speed, of course) ...
    ***********************
    * Bill Clark Windham, VT *
    ***********************

  12. #12
    Join Date
    Feb 2015
    Location
    Colorado
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: samba - networks issue

    Quote Originally Posted by kappclark
    I enjoyed going through your document
    Thank you very much. It's great to get some feedback.

    Quote Originally Posted by kappclark
    -- I see the MB is ITX - what case did you use ? Can u maybe post a picture ?


    I made this crude case (my wood working skills are not the best) to hold both my LAN server and Web server. It is 7 1/4" W x 9" H x 7" Deep. It houses both server MBs, and in the center, both power blocks, and both USB backup SSDs. Note the yellow base with a circuit board on it, plugged into the 24 pin power connector. These are the PicoPSU-80 power units with a 60 W 12V power block mounted in the center section.

    As for a commercial case, I have bought 2 of these:
    https://www.mini-itx.com/store/~M350
    EDIT: also available from Amazon
    with the PicoPSU-80 and 60W power block which they also sell. Works well for what I want to do.
    One of the M350 cases was going to be used in a somewhat warm environment so i got my nibbler out and added a fan

    Last edited by Pudge; 17th May 2019 at 03:07 AM. Reason: Added M350 case URL
    I try to think, but nothin' happens!

  13. #13
    Join Date
    Jun 2005
    Location
    Montreal, Que, Canada
    Posts
    5,957
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: samba - networks issue

    I am impressed with the wooden case. It also does some sound proofing, as wood does not carry sound as well as metal.

    I wonder if the paper egg carton flats could be made fireresistant and used to make an even quieter system.
    Leslie in Montreal

    Interesting web sites list
    http://forums.fedoraforum.org/showth...40#post1697840

Similar Threads

  1. samba pdc/wins for two networks
    By gala_dragos in forum Servers & Networking
    Replies: 9
    Last Post: 25th March 2011, 08:43 PM
  2. Wireless issue, Detecting networks but wont connect "WEP"
    By Audiomad in forum Servers & Networking
    Replies: 7
    Last Post: 1st December 2010, 07:14 PM
  3. Multiple Networks (VLAN) and Samba
    By jrmontg in forum Servers & Networking
    Replies: 0
    Last Post: 10th September 2007, 09:44 PM
  4. Make Nautilus Scan for Samba Networks
    By meslick in forum Using Fedora
    Replies: 1
    Last Post: 8th October 2006, 12:03 AM
  5. Issue with Samba in FC4
    By Elegy in forum Servers & Networking
    Replies: 5
    Last Post: 16th June 2005, 10:04 PM

Posting Permissions

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