collapse Table of Contents
  1. Care and Feeding of openSUSE 10.2 - Jonathan Pryor's web log
    1. Care and Feeding of openSUSE 10.2
      1. IP Masquerading/Network Address Translation (NAT)
      2. HTTP Server with mod_userdir
      3. Windows Shares

Care and Feeding of openSUSE 10.2 - Jonathan Pryor's web log

« openSUSE 10.2 Complaints | Main | openSUSE 10.2 Windows Key Workaround »

Care and Feeding of openSUSE 10.2

I upgraded to openSUSE 10.2 recently, and since I installed from scratch I had to figure some things out so that it would be usable. Sadly, Google isn't very helpful with some of these issues...

See SUSE Linux Rants for steps to install media codecs so that you can play videos and DVDs.

Then comes the stuff that Google doesn't help with...

My machine has two ethernet cards: eth0 is the external-facing device (connected to a cable modem), while eth1 is the internal-facing device, which is connected to a Wireless Router and desktop machines. I need to setup IP Forwarding so the internal machines can access the Internet, plus setup some Samba shares so the Windows Machines can access shared files.

IP Masquerading/Network Address Translation (NAT)

  1. Start YaST
  2. Start the Network Devices → Network Card Program in YaST.
    1. Select Traditional Method with ifup. Click Next.
    2. Select the internal network card. Click Edit.
    3. In the Address Tab:
      1. Select the Static Address Setup radio button.
      2. Set the IP Address field to 192.168.1.1.
      3. Set the Subnet Mask field to 255.255.255.0.
      4. Click the Routing button.
      5. Check the Enable IP Forwarding check box.
      6. Click OK to exit Routing Configuration.
    4. In the General Tab:
      1. Set Firewall Zone to Internal Zone (Unprotected).
      2. Set Device Activation to At Boot Time.
      3. Click Next.
    5. Click Finish.
  3. Start the Security and Users → Firewall program in YaST.
    1. In the Start-Up node, within the Service Start area, check the When Booting checkbox.
    2. In the Interfaces node, make sure that eth0 is the External Zone, while eth1 is Internal Zone. Note: eth0 and eth1 aren't used here; instead, the devices names are used here (e.g. Realtek RT8139).
    3. In the Masquerading node, check the Masquerade Networks check box.
    4. Click Next, then Accept.
  4. Make sure that eth0 has an IP address, and that you can view a web page.
  5. Start the Network Services → DHCP Server program in YaST.
    1. In the Start-Up node, within the Service Start section, check the When Booting check box.
    2. In the Card Selection node, select the device which is eth1, which should be the one with an actual IP address listed (eth0 is probably DHCP), check the Open Firewall for Selected Interfaces check box, and click the Select button.
    3. Read the file /etc/resolv.conf. There should be at least one line starting with nameserver, followed by an IP Address, e.g. nameserver 1.2.3.4.
    4. In the Global Settings node, set the Primary Name Server IP textbox to the first nameserver entry in /etc/resolv.conf, and set the Secondary Name Server IP textbox to the second nameserver entry in /etc/resolv.conf. Set the Default Gateway field to the IP Address of eth1, e.g. 192.168.1.1.
    5. In the Dynamic DHCP node, set the First IP Address field to 192.168.1.10, and the Last IP Address field to 192.168.1.254.
    6. Click Finish.

You should now be able to connect to the router from any internal machine via DHCP and connect to the outside world.

HTTP Server with mod_userdir

mod_userdir is an Apache module that allows accessing the /home/username/public_html directory as the URL http://server/~username/. It should be easy to setup, and yet I always have grief setting it up...

  1. Start the Network Services → HTTP Server in YaST.
    1. In the Listen Ports and Addresses Tab, make sure that HTTP Service is Enabled, Listen on Ports has a Network Address value of All Addresses, and Port is set to 80. Check the Open Port in Firewall checkbox.
    2. Click Finish.
  2. Edit /etc/sysconfig/apache2 as the root user, and change line 32 from:
    APACHE_CONF_INCLUDE_FILES=""
    to:
    APACHE_CONF_INCLUDE_FILES="extra/httpd-userdir.conf"
  3. Run the following commands as the root user:
    • /sbin/SuSEconfig
    • /usr/sbin/rcapache2 restart

Windows Shares

I have internal Windows machines which need to use files on the router (it doubles as a file server), so I obviously need a Windows share. This involves configuring Samba.

  1. Start the Network Services → Samba Server program in YaST.
    1. In the Shares tab, check the Allow Users to Share Their Directories check box.
    2. Click Finish.
  2. Create a user (Security and Users → User Management) for each remote user that needs to access the Windows Share (assuming you don't want Guest access to the share).
  3. At the command line, type the following as the root user for each remote user
    • /usr/bin/smbpasswd -a username

You should now be able to connect from any remote machine as the user username, using the same password that was entered in the smbpasswd command.

Posted on 30 Dec 2006 | Path: /development/ | Permalink
blog comments powered by Disqus