SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Location: Rome, Italy ; Novi Sad, Srbija; Brisbane, Australia
Distribution: Ubuntu / ITOS2008
Posts: 1,207
Rep:
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?
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.
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.
Location: Rome, Italy ; Novi Sad, Srbija; Brisbane, Australia
Distribution: Ubuntu / ITOS2008
Posts: 1,207
Original Poster
Rep:
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
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?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.