LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   SUSE / openSUSE (https://www.linuxquestions.org/questions/suse-opensuse-60/)
-   -   Setting up a network with a Suse box & a Windows box (https://www.linuxquestions.org/questions/suse-opensuse-60/setting-up-a-network-with-a-suse-box-and-a-windows-box-515971/)

flatstan 01-03-2007 02:50 PM

Setting up a network with a Suse box & a Windows box
 
:newbie: I have two computers, each with HDD trays, I have Internet access through a Cable Modem, each box has a 10/100 NIC & they are connected with a crossover cable.
On running Windows XP on both boxes, using the Windows Network Setup Wizard, I can access the Web on both boxes, no problem. One box configured as Master with the cable modem connected to the Ethernet socket on the Motherboard, the other as slave & getting it's web connection through the Network card, all works well.
I have tried to do the same thing with running SUSE 10.1 on the master box, & Windows XP on the slave box. The Suse Box has the Cable Modem plugged into the Ethernet connection on it's motherboard, & can access the net OK. The Windows box is configured as slave, & is connected to the SUSE Box with the Xover cable as before. I can't get the Windows box to access the net, I have tried bridging the NIC card connection with the Ethernet connection, but this makes no difference.
SUSE/Linux books talk about manualy configuring, but this means entering IP address's. There does not seem to be a facility similar to the Windows Network Setup Wizard on SUSE.
Can anyone give me a step by step way to network my 2 boxes to access the Net through one Cable Modem. Thanks. :confused:

drokmed 01-03-2007 04:53 PM

Thats easy.

First of all, your post appears to have a discrepancy. You say each pc has one nic, yet you claim the server has the cable modem connected via the nic, and the slave pc is ALSO connected to the server via a xover cable to the nic. How is this possible? You would have to have 2 nics in the server for the config you described.

Anyways, I have a very simple solution. I'm assuming your cable modem only has one ethernet nic.

I see you are in London. Go to a local electronics store, and buy an inexpensive router. Tell the guy you need to share at least two pc's with a cable modem. He'll know what to give you. They usually start with 4 LAN ports, and some models also have wireless.

Then, connect the cable modem ethernet cable to the router WAN port, then connect EACH pc to the router's LAN ports. You will need three ethernet cables. It sounds like you have two. The router should come with one. If not, you need another ethernet cable.

The linux server is probably already setup to run dhcp. Just reboot it, and it should see the internet thru the router.

Reconfigure the windows nic to just use dhcp to connect to the internet via LAN, then reboot. It should see the internet thru the router.

This setup is better, because now either pc can access the Internet directly thru the router, without depending on the other pc to be on. And, you wont have to bother setting any routing/forwarding stuff on the suse box.

Hope this helps! Good luck!

rnturn 01-03-2007 11:19 PM

Quote:

Originally Posted by flatstan
:newbie: I have two computers, each with HDD trays,

Hah! All my computers have coffee cup holders! :-)

Quote:

I have Internet access through a Cable Modem, each box has a 10/100 NIC & they are connected with a crossover cable.
On running Windows XP on both boxes, using the Windows Network Setup Wizard, I can access the Web on both boxes, no problem. One box configured as Master with the cable modem connected to the Ethernet socket on the Motherboard, the other as slave & getting it's web connection through the Network card, all works well.
So you have a system whose mainboard has an ethernet device as well as a separate ethernet adapter installed. The second computer has its own ethernet adapter. No comments about the above other than the use of the crossover cable is something I'd avoid. An inexpensive 10/100 switch would be a better setup for the connecting systems on the local side.

Quote:

I have tried to do the same thing with running SUSE 10.1 on the master box, & Windows XP on the slave box. The Suse Box has the Cable Modem plugged into the Ethernet connection on it's motherboard, & can access the net OK. The Windows box is configured as slave, & is connected to the SUSE Box with the Xover cable as before. I can't get the Windows box to access the net, I have tried bridging the NIC card connection with the Ethernet connection, but this makes no difference.
SUSE/Linux books talk about manualy configuring, but this means entering IP address's. There does not seem to be a facility similar to the Windows Network Setup Wizard on SUSE.
I suspect that there's no forwarding enabled on the SUSE system. (I.e., packets coming in through the mainboard's ethernet device aren't being forwarded to any other ethernet devices.) If the firewall is enabled on the SUSE system you might have to do some non-trivial tweaking of its parameters to get things working. (Sorry, but I'm not much help with SUSE's firewall configured via YaST. I typically disable it since I have a dedicated firewall system between the local network and the outside workd.)

You've said nothing about the IP addresses you're using. The "master" system is going to have some internet routable IP address assigned to the ethernet device (say, "eth0") on your mainboard. It'll be either static or via DHCP (most likely). The second ethernet device (say, "eth1") on your "master" system will have to have some IP address assigned to it. It ought to be something like 192.168.1.1 (with a netmask of 255.255.255.0). The Windows system could then use 192.168.1.2 (same netmask). I'm guessing about this but I'd bet that the master/slave arrangement you have gotten working with Windows uses something like this behind the scenes. (If they don't do that, I'm not sure I wanna know about it. :-) )

Someone else has already suggested a dedicated router and that sounds like a good idea. It removes a bunch of complexity from your SUSE system, that's for sure. (As s/he noted.)
Quote:

Can anyone give me a step by step way to network my 2 boxes to access the Net through one Cable Modem. Thanks. :confused:
I know of no single step-by-step set of instructions to do this. A good place to look if you really want to configure your SUSE system to do all the necessary routing, firewalling, and IP masquerading would be the networking HOWTOs over at the Linux Documentation Project: http://www.tldp.org/

Sorry to not be more help. Networking can be tricky. (If it weren't, Windows wouldn't have gone to the trouble of making that wizard.)

--
rt

flatstan 01-04-2007 06:09 AM

Thanks for the replies.
drokmed - each PC has a Mobo with a ethernet socket also a separate NIC, see rnturn's reply.
rnturn - I temporaly disabled the firewall on both the boxes for the reasons you said, but it made
no difference.
I had thought of using a router, but knowing that using one cable modem for two boxes works well
with a double Windows setup, naturally I would like to do the same with a Linux / Windows setup.
I don't like to give up & use a router yet, I'll try the tidp link you suggested.
Regards fellas & a happy New Year.

Jon Briggs 01-04-2007 07:09 AM

Just buy a propar router with NAT then you won't have to bother with internet connection sharing. Using a cross over cable etc is a lame way to do it anyway. And of course using a cable modem you don't have a hardware firewall which a router will also give you.

rnturn 01-04-2007 10:39 PM

Quote:

Originally Posted by flatstan
I temporaly disabled the firewall on both the boxes for the reasons you said, but it made
no difference.

That's what IP forwarding is for: passing packets from one interface to the other. Just turning off the firewalls won't make that happen. In fact, leaving the Linux system's firewall on and configuring it properly will let you route packets from one interface to the other using some predefined policy. Say, you don't want the kids using the Windows system to visit certain sites or you don't want the Windows system to see any requests for sharing files. You can do that.
Quote:

I don't like to give up & use a router yet, I'll try the tidp link you suggested.
It can be a lot of work but it feels pretty good when you get that last piece working.

BTW, another decent resource is over at Steve Litt's Troubleshooters.com web site. Some of the pages may be old but still generally useful as the Linux way of doing things hasn't changed that much. Good luck.

--
Rick

drokmed 01-05-2007 09:49 AM

I'm sorry, my bad, I didn't read it close enough.

OK, sounds like you really want to learn how to make a suse box a router with NAT. There are many options.

The built-in firewall configuration tool is absolutely worthless, unless you really want to learn iptables syntax. There are soo many firewall tools on the market now, there's no reason to learn it except out of curiousity I suppose. Disable it.

For my firewalls, I like to use shorewall.

www.shorewall.net


It can be configured from the command line, but can also be configured via the webmin gui management tool. If you aren't familiar with webmin yet, check it out. It's an excellent remote server management tool that runs on all linux platforms. You can point your browser to it from anywhere on the net, and manage most tasks on your linux box, most better than the box itself provides.

www.webmin.com

There are many how-to documents for configuring shorewall to do what you are looking to do. Here is their how-to for what you are looking to do.

http://www.shorewall.net/two-interface.htm

There is an even shorter way. They have an example directory with example config files. You can copy the sample files over the config files, then tweak them if even necessary. This is the quickest way to bring it up.

The webmin site also has an excellent how-to for configuring shorewall using webmin.

http://rouke.freeasanerd.com/manuals/

Sorry for the confusion. Hope this helps! Have fun!

flatstan 01-07-2007 10:57 AM

Linux Windows Networking
 
Thanks again, but as I said before Firewalls are not the problem, I turned off both SUSE & Windows Firewalls, but still could not access the Net on my Windows box via the Linux box. I went through the setting up of my Linux box as a router again & again, fiddling with the settings, to no effect.
With the Windows box, the internal NIC properties, show that it is working OK, & it's status shows that it sends but does not receive, as you would expect if there is not a source to receive from. So either the Linux box is not configured to forward properly, or the Windows box is not configured to receive from the right source. I am sure that all the components are OK, & the system is OK, as it all works well with Windows to Windows boxes & using the Windows Network Wizard. Does Linux have some similar software, to the Windows Network Setup Wizard ?. I am not giving up yet, but if I can't find a solution & have to resort to a router, then I will have to come to the conclusion, that Windows is better than Linux at Networking. Regards.

drokmed 01-08-2007 09:26 AM

You have to turn on the linux firewall.

If you are using private IP addresses on your internal LAN (ie 192.168.x.x) then you have to turn on the linux firewall, then turn on masquerading (NAT).

The NAT masquerading performs the "routing/translation" between your internal LAN and the Internet. It's embedded in the firewall, so you have to turn the firewall on, then masquerading.

If you still dont get that to work, let me know, and I'll build a box here and write the exact commands down.

flatstan 01-09-2007 08:36 AM

Linux Windows Network
 
Thanks drokmed, I'll try that & get back to you. :D

flatstan 02-04-2007 02:34 PM

Network Wndows & Linux Boxes
 
Hi Drokmed, sorry for the delay in getting back to you. I tried your suggestion but no go. I would be grateful for the complete set of commands when you have time. Regards.

drokmed 02-05-2007 10:03 AM

Quote:

Originally Posted by flatstan
Hi Drokmed, sorry for the delay in getting back to you. I tried your suggestion but no go. I would be grateful for the complete set of commands when you have time. Regards.

Heya!

I'm glad to hear you are still interested in linux! I was wondering if you had got the routing working.

I usually configure the nat/routing at the installation time, so the commands I use are useful only during a fresh install. I have been working on a how-to document that I use to build servers for clients. I have cut out an excerpt that covers what you are looking for. I hope you find it useful.

Good Luck!!!!


=======


OpenSUSE Installation Instructions:


Minimum/Recommended Hardware Requirements:

If you intend to make this a production server, don't be a cheapskate. Whip out $600 at Best Buy and buy a decent pc. I'd recommend an Athlon 64-bit (yes I have tested the suse 64-bit version), with 1 GIG RAM (minimum), a DVD burner (for backups), and a big fat hard disk.

Don't forget to buy the 2nd NIC (this server will also be the Internet router/firewall/gateway).

Note: You do not want a bleeding edge machine that has extremely new hardware, because the linux drivers for that hardware may not yet exist. Although OpenSUSE does a fantastic job of supporting more hardware than any other distribution (seriously), there's still a chance some new hardware support hasn't been included yet, at least on the install DVD. I've bought and used the mid-level E-Machines and HP pc's from Best Buy, and they work just fine. For a complete list of supported hardware, see OpenSUSE's hardware compatibility list at: www.opensuse.org

Pre-installation Lab setup:

Your lab will need:
1 server pc (with the 2nd NIC already installed)
1 ethernet router (linksys or equivalent, has multiple LAN ports, no wireless necessary)
1 ethernet switch or 1 crossover cable
2 test pc's (at least one, with dual-boot OpenSUSE and Windows)
ethernet cables

I assume you will be building this server, like I do, connected to a production network that has internet access, either at home or the office, and will later deliver it to your customer. If the network you are connecting to uses the 192.168.1.0/24 network, then you have a problem. I have the same problem. I have a spare router (linksys) that I use to put between my production network and this server I'm building. If you do not have a spare router, pick one up at Best Buy for about ~$40. It's a good investment. Have plenty of Ethernet cables too.

Connect everything as follows:
-connect an Ethernet cable from your production network to the uplink port of the router (the linksys router, not the server)
-connect an ethernet cable from a LAN port on the router to the WAN port of the server (we'll verify this connection again later)
-connect another ethernet cable from a LAN port on the router to the Internet test pc. We will use this pc to reconfigure the linksys router (change it's default LAN addressing to 192.168.2.0/24), as well as test connectivity to the server from the Internet side, ie email access, vpn, etc.
-connect an ethernet cable from the LAN port of the SERVER to an ethernet switch
-connect an ethernet cable from the ethernet switch to the 2nd test pc (the LAN pc). The LAN pc will be used to test access to the server as a LAN workstation, verifying access, remote control, and access to all services as a standard LAN user.

Please note: if you want, you can replace the ethernet switch and two cables with just one crossover cable.

Pre-installation software downloads:

You have to download and burn two products to DVD/CD: OpenSUSE and Scalix.

Download the OpenSUSE 10.2 DVD (the DVD includes additional hardware drivers including non-GPL drivers from ATI and NVIDIA). Download the 32-bit version if using a 32-bit CPU, or the 64-bit version if using a 64-bit CPU. I've used both. They both work. I'd recommend a 64-bit CPU because it processes data at twice the throughput. True, many tasks have not yet been optimized for 64-bit, but they eventually will. You should plan for the future, not obsolescence.

Download the Scalix Email/Calendar server software from here: www.scalix.com/community

You will notice Scalix offers a community (open source) edition, and an enterprise edition. They are both the same software! When you buy the enterprise edition, you install a license key which basically enables some advanced features. Some customers will later choose to buy the enterprise edition. However, most small businesses will be very happy with the community edition we install here.

Install OpenSUSE 10.2:

Install using the OpenSUSE 10.2 install DVD. Don't bother with the CD's. Do a normal install. If you have an existing windows partition, your call if you want to keep it. At least shrink it. You will need at least 6GB free disk space, but you will want MUCH MORE if your server will do anything useful. Most new pc's have 100+GB disks.

OK, boot the installer, and start the installation.

Timezone: set to use local time (emails will be set to this timezone)

Partitioning: Unless you have a plan for your linux partitioning, I recommend you make a swap partition (twice the size as RAM) and put the rest into the root partition. Since users will never login directly on this server, there is no reason for a separate /home partition (unless you intend to let users store files in a personal directory). For experienced people, use LVM and create a separate /var for the email server, /srv for the ftp/website, /shares for the file server, etc.

Hostname and Domain Name: make sure these names are final. WRITE THESE DOWN!!! You will not be able to change these later! Verify this with your client! If your hostname is SERVER, and they already have a host named SERVER, you are screwed. Try SERVER1, or LINUX-SRVR or SUSE-SERVER or ABAZABA-SRVR etc.

Graphical User Interface:
-select gnome

Note: for you KDE fans, I select gnome because it is easier for windows people to learn and use. True, KDE in many ways is more advanced, but not as intuitive, which is the goal here.

Network Mode: leave on Traditional (do not use the NetworkManager Applet)
Firewall: leave enabled
SSH port: change to open

Network Interfaces:

This is absolutely critical. It should recognize both NICs. The first NIC should be configured to use DHCP. Leave that NIC alone.

The second NIC is currently unconfigured. Let's configure it now:
-click on Network Interfaces
-edit the second NIC
-change to static address
-assign address: 192.168.1.1
-routing button: enable IP forwarding

NOTE: At this point, make sure you WRITE DOWN which NIC is which! For example, on my PC, the Compaq NIC is dhcp, and the Linksys NIC is static. You will need to identify them before plugging your two ethernet cables in.

Firewall: should now have message it detected an additional NIC. Click on it:
-interfaces: change the static NIC to internal zone
-allowed services on external zone: add: HTTP server, HTTPS server, IMAP server, IMAPS server, Mail server, POP3 Server, POP3S Server
-click on Masquerading: enable Masquerade Networks
-click on Accept

Note: In the firewall, we do not want to open external zone ports to allow access to things like vnc, webmin, etc. For added security, they can only be accessed through a vpn tunnel.

Remote Administration:
-enable it (we're not initially using this version, but it's enabled in case you later want it).

That's it for network configuration.

WARNING: Before clicking Next, you MUST have your Ethernet cables correctly connected. Plug them in now. The NIC with dhcp is your WAN NIC. The NIC with the static IP address is the LAN NIC. WRITE THIS STUFF DOWN!!!! I physically label the NICs on the back of the server itself, next to the ports. Tape a “WAN” label to the WAN NIC, and a “LAN” label to the LAN NIC. Trust me, you will kick yourself HARD later if you DO NOT do this!!!

OK, when you press Next, the server will activate both NICs, request the dhcp info from the WAN side, and populate the routing table. If it cannot get dhcp info, or if there is an address conflict or other problem, you must troubleshoot it before proceeding.

The next screen is the Test Status. It will attempt to download the latest release notes from the Internet. THIS MUST SUCCEED. If it fails, you have a network problem. You must troubleshoot your network, then click BACK, then Next again (to re-initialize the NICs). If you do not resolve this now, the entire install will be foiled.

Novell Customer Center Configuration: accept defaults: next

Accept all updates. Apply all patches.

Register additional Installation sources:
-check all three
-register now: yes

User Authentication method: Local. Please note: even though this server will provide LDAP services, we do not want any users logging directly in to this server. There will only be two login accounts on this server: root and administrator.

New Local User:
-User's Full Name: Administrator
-Username: administrator
-Password: makeoneupcanchangeitlater
-Confirm Password: makeoneupcanchangeitlater
-Receive System Mail: YES
-Automatic Login: NO

Hardware Configuration: tweak as you like
-Graphics: I recommend you set the graphics to 1024x768 resolution, and colors to 65536 (16-bit). Remember, we are going to remote control this server. Higher resolutions wont fit on remote machines, and too many colors just eats up memory, and drastically slows down the remote controlled connection.
-Printers: If you know what printer they have, you can install it now. I usually wait until the server is in place, and the printer connected, before I setup the printer.

That's it! Finish. System will reboot.


ABAZABA Installation Instructions:


Login as administrator

Chances are the Software Updater ICON will signal there are updates available. Go ahead and install those first. You will be prompted to Add Privileged User. Do it.

Install all updates. Some updates may require a reboot. Finish all updates.

Customize Desktop:

Let's add some launcher icons to the panel. This is purely individual preferences, however I try to help the Administrator that will manage this server. Personally, I don't like the new menu system, but I leave it on, and show the customer my laptop (classic gnome menu), then let them decide.

-Click on Computer, More Applications
-find YaST, drag it to the panel, right side
-same for: Printers, Install Software, Remove Software, Home Folder, Network Servers, Network Tools, Disk Usage Analyzer, Firefox, Gnome Terminal

Configure YaST:

First, we need to modify the installation settings in YaST.

Launch YaST. It's the green icon towards the lower right of the screen. You will become very familiar with the YaST tool. It is excellent. It is the main reason OpenSUSE is the leading linux distribution.

YaST->Software->Installation Source

These are the sources where SUSE will search when you wish to install additional software. We are going to tweak this list.

First, we want to install from Internet sources only. We do not want SUSE prompting to insert the dvd every time we try to install something.

Find the line that looks like: cd:///?devices=/dev/hdc
-click on Source Settings: disable

Find the line that has “oss” at the end (not the non-oss line)
-click on Source Settings: enable

Note: we added the non-oss and debug sources to the list, but have not yet enabled them. We want these here just in case we decide to use them in the future.

We're done. Click Finish.

YaST will now say 'Synchronizing with ZENworks'. This takes a while. The server is now reading all file information from each of the sources we just enabled. Let this finish. This takes longer than it should. Hopefully OpenSUSE will improve this in future versions.

When it's done, we are ready to start building our server.

Install DNS Server:

This server will provide DNS services for the LAN/intranet/internal zone. We want the server to automatically learn all DNS information from the dhcp client (WAN), and share it with the local network. This can be done automatically. We do not have to manually enter the DNS servers into the /etc/resolv.conf file.

YaST -> Software -> Install

-Search for: DNS
-check these packages for installation: bind, yast2-dns-server
-click Accept
-Installer will inform you three additional packages are required: bind-chrootenv, perl-Parse-RecDescent, perl-X500-DN
-click Continue

YaST will now download these from the Internet, and install them.
-will eventually ask: Install or remove more packages? click No
-close YaST

Since we just installed the yast2-dns-server module, we have to restart YaST to see it as one of the options in the menu.

Configure DNS Server:

YaST -> Network Services -> DNS Server

-select: PPP Daemon Sets Forwarders
-click Next

In the Add New Zone Name box, you MUST enter the IDENTICAL name you choose during installation. If you forget what it is:
-open a terminal (click on Gnome Terminal icon)

You will get a prompt that looks like:
administrator@server1:~>
-type: cat /etc/hosts
administrator@server1:~> cat /etc/hosts

(multiple lines not shown here)
OK, the last line will look something like:
192.168.1.1 server1.abazaba.org server1

(In this example, the domain name is abazaba.org)
-in the Name box, enter the correct domain name
(for example, in the Name box, I entered: abazaba.org)
-click Next

-change startup behavior to: On: Start Now and When Booting
-click Finish

The DNS Server is now configured and running. To verify:
-open a terminal (click on Gnome Terminal icon)
-type: ps -e | grep named
You should see a line with named in it:

administrator@server1:~> ps -e | grep named
3821 ? 00:00:00 named
administrator@server1:~>

-now try: cat /etc/resolv.conf

The last lines should have a search line of your own domain, then nameservers listed afterwards.

Install DHCP Server:

This server will provide DHCP services for the LAN/intranet/internal zone. We want the server to automatically learn all DNS information from the dhcp client (WAN), and share it with the local network, via the DHCP client requests.

YaST -> Software -> Install

-Search for: DHCP
-check these packages for installation: dhcp-server, yast2-dhcp-server
-click Accept

YaST will now download these from the Internet, and install them.
-will eventually ask: Install or remove more packages? click No
-close YaST

Since we just installed the yast2-dhcp-server module, we have to restart YaST to see it as one of the options in the menu.

Configure DHCP Server:

YaST -> Network Services -> DHCP Server

-select the NIC that is using address 192.168.1.1 and click Select
-click: Open firewall for selected interfaces
-click Next

Fill-in the fields:
-Domain Name: abazaba.org (or whatever yours is)
-Primary Name Server IP: 192.168.1.1
-Default Gateway: 192.168.1.1
-NTP Time Server: 192.168.1.1
-Print Server: 192.168.1.1
-WINS Server: 192.168.1.1
-click Next

Fill-in the dhcp address range. How many do you need? Here is an example that allocates 150 dhcp addresses. If you need more, modify as desired:
-First IP Address: 192.168.1.50
-Last IP Address: 192.168.1.200
-click Next

Change:
-Service Start to: When Booting
-click Finish

To verify it is working:
-open a terminal (click on Gnome Terminal icon)
-type: ps -e | grep dhcpd

You should a line with dhcpd in it, like so:

administrator@server1:~> ps -e | grep dhcpd
3840 ? 00:00:00 dhcpd
administrator@server1:~>

You are now ready to connect the LAN test pc to the server.

Connect to server from the local LAN test pc:

I'm assuming your remote PC is naturally running OpenSUSE 10.2. If you are running Windows, you will need to perform it's equivalent tasks. I recommend you use a dual-boot PC for a test workstation, that has both Windows and OpenSUSE. We will want to test from both platforms.

You can now connect your test PC to the LAN side of the server, and connect to the server! Make sure the PC is configured to use a dhcp client, to request it's info from the server. If it is already connected, the SUSE pc will auto-detect just by unplugging/reconnecting the ethernet cable on the SUSE pc. For Windows, you will have to tell the network connection program to disable/re-enable the interface, to force it to get a new dhcp address.

Lets try some pings to verify we have connectivity from our remote linux PC:
-open a terminal (click on Gnome Terminal icon)
-type: ping 192.168.1.1
-type: ping server1 (or whatever you named it)
-type: ping www.yahoo.com

Note: if you can't ping everything, you need to find out why. Are you running a dhcp client on the local pc? Are the cables plugged in the right places? Is the switch on? Troubleshoot it. Check ifconfig, netstat, route, arp, etc.

If we can ping it, we can ssh to it:
-type: ssh administrator@192.168.1.1

The first time you ssh to the server from each pc, it should respond with a message like:
The authenticity of host '192.168.1.1 (192.168.1.1)' can't be established.
RSA key fingerprint is 77:44:4a:7b:6c:04:16:14:5b:74:22:c4:8b:78:3a:b8.
Are you sure you want to continue connecting (yes/no)?
-enter: Yes
The server will then say:
Warning: Permanently added '192.168.1.1' (RSA) to the list of known hosts.
Password:
-enter the administrator password

You should now be logged in, and the prompt will look something like:
administrator@server1:~>
-enter: who
administrator@server1:~> who
administrator :0 2007-02-01 16:30
administrator pts/0 2007-02-01 16:32 (:0.0)
administrator pts/1 2007-02-01 18:13 (192.168.1.134)
administrator@server1:~>

Let's try a few commands:

administrator@server1:~> df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda2 5692436 3112148 2291120 58% /
udev 128188 100 128088 1% /dev
administrator@server1:~>
administrator@server1:~> su -
Password:
server1:~ # ifconfig
eth0 Link encap:Ethernet HWaddr 00:14:BF:57:35:46
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::214:bfff:fe57:3546/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:552 errors:0 dropped:0 overruns:0 frame:0
TX packets:318 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:51191 (49.9 Kb) TX bytes:43873 (42.8 Kb)
Interrupt:11 Base address:0x2400

eth1 Link encap:Ethernet HWaddr 00:50:8B:74:C7:6B
inet addr:192.168.2.100 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::250:8bff:fe74:c76b/64 Scope:Link
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
RX packets:26964 errors:0 dropped:0 overruns:0 frame:0
TX packets:16108 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:38209469 (36.4 Mb) TX bytes:1205477 (1.1 Mb)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:830 errors:0 dropped:0 overruns:0 frame:0
TX packets:830 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:59005 (57.6 Kb) TX bytes:59005 (57.6 Kb)

server1:~ #
server1:~ # netstat -nr
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 192.168.2.1 0.0.0.0 UG 0 0 0 eth1
server1:~ #
server1:~ # arp -a
? (192.168.2.1) at 00:12:17:00:F4:68 [ether] on eth1
? (192.168.1.134) at 00:0D:56:7A:68:72 [ether] on eth0
server1:~ #

OK, ssh works! Time to get the VNC server working.

Configure VNC Server:

OK, we're now ready to enable the VNC remote control software, so we can perform the rest of the installation remotely, from any linux or windows machine.

There are two types of the VNC servers installed on OpenSUSE servers by default. We want the one that remote controls the current session on the server (the other one creates an independent session, which we may enable later if we wish).

To configure the VNC server:
-click Computer
-click Control Center
-in the hardware section, click Graphics Card and Monitor
-enter the administrator password if prompted

SaX2: X11 Configuration program:
-click on Remote Access
-enable: Allow access to display and keyboard/mouse of your X Server
-enable: Activate Password Protection
-enter password: (use the administrator password)
-leave multiple connections disabled
-enable: Activate HTTP access
-leave default port to 5800

You will get a message to test the server:
-click Test

You will get a message stating ports 5900 and 5800 need to be opened in the firewall. We dont need to worry about this. We will not be opening these ports to the external zone (Internet). The internal zone (LAN) is not blocking anything, so we can access this from any local pc.
-click OK

A screen will appear to adjust the screens dimensions. Leave this alone.
-click Save

A configuration saved message will tell you to restart the graphics system.
-click Yes (to exit program)

Close all Windows, and logout.

Now return to your test pc:
-open a gnome terminal
-ssh to the server
-become superuser (root), enter: su -
-restart the graphics system, enter: rcxdm restart

administrator@server1:~> su -
Password:
server1:~ #
server1:~ # rcxdm restart
Shutting down service gdm done
Starting service gdm done
server1:~ #

Watch the server. The screen should clear, then restart to the login screen.

On the server, go ahead and login as administrator.

On the test pc, lets try to remote control the server:
-from your workstation PC, open a terminal:
-enter: vncviewer 192.168.1.1
-enter the password

Viola! The remote control window should open on your screen, and you are now looking at whatever is currently displayed on the server. You have control of the servers mouse and keyboard. Try moving the mouse around on your test pc. It should also move on the server. Right-click, open a terminal, and type some commands. Pretty cool, eh? We now have remote control of the server.

flatstan 02-06-2007 11:52 AM

Linux Windows Network
 
Thanks drokmed, yes I'm still using Linux, I use it all the time now, networking is my only problem at this time.
This sure is a lot of info, I will work through it asap.
I assume:- miss out the pre install/ install steps & use the Network config info, cept use it via Yast, is this OK. Regards flatstan.

Digdis 03-06-2007 03:08 AM

drokmed - cheers for the thorough answer. I also need to connect from Windows to my OpenSuSE 10.2 box via VNC (I use UltraVNC), but after following your instructions, it still tells me I can't connect to screen 0 (port 5900). If I use screen 1 (port 5901), it will open a new session, which is not what I want. Any ideas?
Cheers,
D.

drokmed 03-07-2007 09:13 AM

Quote:

Originally Posted by Digdis
drokmed - cheers for the thorough answer. I also need to connect from Windows to my OpenSuSE 10.2 box via VNC (I use UltraVNC), but after following your instructions, it still tells me I can't connect to screen 0 (port 5900). If I use screen 1 (port 5901), it will open a new session, which is not what I want. Any ideas?
Cheers,
D.

Hiya Digdis and thanks,

I'm on the road now, will check when I get back to the office.

On my windows pc's, I use the VNC viewer from RealVNC:

http://www.realvnc.com

If you followed the above howto, you have TWO different VNC servers configured, one from YaST (remote login) and one from sax2 (remote control). I'd say shut off the yast one (the new session) and try again.

YaST -> Network Services -> Remote Administration

Set this to NOT allow remote administration. This is the one that is giving you the new session. I take it you dont want that, but just want to remote control the pc. For that one, see:

YaST -> Hardware -> Graphics Card and Monitor

VNC -> Allow access... turn on, and accept defaults. Don't forget when you make changes here, you have to reset the graphics system. A simple reboot will do it too.

From the windows pc, you shouldn't have to specify a port or screen number, but just the IP address (or name if DNS resolution).

If that doesn't do it, try opening those ports in the firewall (not sure if you are blocking INTERNAL zone).

Good luck!


All times are GMT -5. The time now is 11:10 PM.