LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-26-2002, 11:49 AM   #1
NSKL
Senior Member
 
Registered: Jan 2002
Location: Rome, Italy ; Novi Sad, Srbija; Brisbane, Australia
Distribution: Ubuntu / ITOS2008
Posts: 1,207

Rep: Reputation: 47
Two Slackware networking Q's


I have finally set up a simple LAN (two NICs and a cable) connecting my two machines. I can ping, FTP, SSH from one to the other.
Now, on muhri.net i read that i can ssh into one box and start gkrellm in that box to monitor it remotely.
But when i try do that this is what happens:
Code:
nskl@SlackBox:~$ xhost +
access control disabled, clients can connect from any host
nskl@SlackBox:~$ ssh Darkstar
nskl@darkstar's password: 
Last login: Wed Jun 26 20:36:53 2002 from slackbox
Linux 2.4.17.
nskl@Darkstar:~$ gkrellm

Gtk-WARNING **: cannot open display: 
nskl@Darkstar:~$
What can i do to get gkrellm working on the second comp, monitoring the first comp?

2. I would like to share my internet connection between two LANned boxes. As far as i understand i need to configure IP MASQ on the box with the connection. Is this correct? So i can go on reading about IP MASQ or is there another (easier) way?

Thank you very much in advance!
-NSKL
 
Old 06-26-2002, 06:07 PM   #2
treebeard
LQ Newbie
 
Registered: Jun 2002
Location: Bucharest, Romania
Distribution: Slackware
Posts: 16

Rep: Reputation: 0
1. before running gkrellm on Darkstar, do the following:
nskl@Darkstar:~$ export DISPLAY=SlackBox:0.0

2. right. depending on your kernel, you have to use ipchains or iptables.
for slackware 8.0, i think it's ipchains.
- first load the module:
# modprobe ipchains
- then masquarade the hosts with ip1 and ip2:
# ipchains -A forward -s ip1 -j MASQ
# ipchains -A forward -s ip2 -j MASQ

supposing you have a local LAN, 192.168.1.x, that you want to masquarade, you need smth like:
# ipchains -A forward -s 192.168.1.0/24 -j MASQ

you can see the firewall rules for forwarding with
# ipchains -L forward
you can flush them with
# ipchains -F forward

of course, you'd better read the Networking howto, the ipchains howto and the ipchains manpage.
 
Old 06-26-2002, 06:09 PM   #3
finegan
LQ Guru
 
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700

Rep: Reputation: 72
1. I've never bothered to forward X11 apps over ssh, but Slack's base sshd_config file is prebuilt to deny this. Check /etc/ssh/sshd_config and page through it and try things. Don't forget to kill and restart the server between tries.

2. That's the way yep, technically it only takes all of 1 line to forward on all traffic from say... device eth0 to go to eth1 and out a DSL or cable modem and then forward the returning packets to the right machine. Offhand, I don't remember what it was, I'm still stuck in the world of ipchains (old 2.2.x kernel MASQ tools), but if you search in the forums it'll turn up fast. This would be quick and dirty and mean NO firewall, which can of course get messy over time.

Cheers,

Finegan
 
Old 06-27-2002, 09:38 AM   #4
NSKL
Senior Member
 
Registered: Jan 2002
Location: Rome, Italy ; Novi Sad, Srbija; Brisbane, Australia
Distribution: Ubuntu / ITOS2008
Posts: 1,207

Original Poster
Rep: Reputation: 47
Ok, i'll go on on reading about networking then, since i dont know ANYTHING about it.



About the gkrellm problem.

I tried export DISPLAY=SlackBox:0.0 but i get:

Code:
Xlib: connection to "SlackBox:0.0" refused by server

Xlib: Client is not authorized to connect to Server



Gtk-WARNING **: cannot open display: SlackBox:0.0
I also edited sshd_config and changed X11Forwarding to YES but this didnt change anything. I also tried exporting the display after editing sshd_config and exporting both displays, allowing connections from anywhere on both displays but i always get the same error...

Any other suggestions?



I tried doing it over telnet. I did xhost + then logged into Darkstar via telnet, exported display to SlackBox and gkrellm started on slackbox how i wanted it to, so it must be a ssh config option somewhere. Since security is not a concern for me inside the LAN, this problem is solved, but if someone knows how to do it over ssh for future reference please tell me.

Thanks again to everybody who helped!

------------------------------------------------------
OK, now another networking question. I have a Printer (Epson stylus color 900) hooked to Comp A (SlackBox). Is there a way to make Comp B (Darkstar) use it too (except by transfering files via FTP and printing them normally) Will i need a HUB to do this, and is it a good idea to get a HUB anyway?
It very satisfying having my own LAN, it makes me feel like a admin im happy!
And my 3GB .mp3 connection is slowly but surely transfering from Comp B to Comp A where i need it to be.
Thanks a lot guys!
-NSKL

Last edited by NSKL; 06-27-2002 at 09:56 AM.
 
Old 07-03-2002, 06:41 AM   #5
gazurtoids
Newbie
 
Registered: Jun 2002
Posts: 9

Rep: Reputation: 0
easy

ok, the machine that is running the x server the app is to be displayed on needs to run "xhost +" first. that disables the access controls (it'll tell you clients can from now connect from any host).

then, while in shell on remote machine, set the DISPLAY variable appropriately:

export DISPLAY=targetmachine:0 (or setenv instead of export, i can never remember which)

now, run your X app and it'll pop up on the screen of the machine running the x server.

works for me anyway.

btw, is it iptables for masquerading with krnel 2.4.x?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SLACKWARE RULES!, but i have some q's joker20 Linux - Newbie 10 09-15-2004 11:01 PM
Slackware, terminal won't open + other q's zazery Linux - Newbie 16 04-11-2004 05:37 PM
Changing X resolution, and other slackware q's Caesar Linux - Newbie 2 08-22-2003 10:24 AM
networking xp and slackware exigent Linux - Networking 8 07-19-2003 04:36 PM
Slackware Q's StamfordRob Linux - Newbie 13 07-11-2003 04:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration