Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#147589 - 08/03/2003 12:50 a question about ipforwarding in Linux??
ilDuce
journeyman

Registered: 22/06/2002
Posts: 92
Hi!

I just put up a Linux gateway at home. With eth0 pointing to the internet and eth1 pointing to my LAN. I have succeded in getting ipforwarding but the problem is that every request gets forwarded to eth0. So if I want to start a VNC session with the server from my LAN it gets forwarded (atleast i think so) to eth0 and therefore misses the VNC server. Also any FTP sessions I start goes through to my ISP:s proxy and then back. Even though I point the connection to the eth1 adress.
I guess this is pretty simple to fix wwith some routing command but I have no idea on how to do it.
maybe something like 'route add -net 127.0.0.1' or something like that.
Any ideas?

Also I want to be able to start apps from my LAN on the gateway on a running X session. The reason for this is that the server is connected to my TV and i want to be able to start Xine and watch movies with the server.
The problem is that, now I am using VNC wich starts a new Xvnc session. And therefor starts any apps executed from the LAN on the Xvnc server wich is not displayed on the TV.
Is there a way to start apps on X display:0 locally on the server. But the commands come from another comp on the LAN. I guess I could telnet/SSH in... but then i wouldnt be able to control Xine very well if I even could get it started with the correct movie.
Is there a VNC-like solution but thats using the Xfree server instead?

Top
#147590 - 09/03/2003 08:50 Re: a question about ipforwarding in Linux?? [Re: ilDuce]
ilDuce
journeyman

Registered: 22/06/2002
Posts: 92
I guess nobody knows here either...... damn..... thats a shame.... This was kind of my last hope.....

Top
#147591 - 09/03/2003 08:57 Re: a question about ipforwarding in Linux?? [Re: ilDuce]
Roger
carpal tunnel

Registered: 18/01/2000
Posts: 5682
Loc: London, UK
on the VNC thing, look for x0rfb, which runs a VNC server against display zero.

on the other thing, I'm sorry, but I didn't understand what you're asking. Perhaps you could attempt to clarify it a little?
_________________________
-- roger

Top
#147592 - 09/03/2003 14:28 Re: a question about ipforwarding in Linux?? [Re: ilDuce]
jaharkes
enthusiast

Registered: 20/08/2002
Posts: 340
Loc: Pittsburgh, PA
My guess is that people know, but your description was lacking the necessary detail to give a usable answer.

About packets being sent to the wrong link, what does 'ip route', or 'route' display? My gateway shows something like

irus:~# ip route
128.2.x.x dev ppp0 proto kernel scope link src 128.2.y.y
10.0.0.0/8 dev eth0 proto kernel scope link src 10.10.10.10
default via 128.2.x.x dev ppp0

In your case the ppp0 would probably be eth0.

As far as remotely starting apps that connect with the 'local' Xserver, it depends on. Do you already have an X server running on the machine? If so what user is running it and if it is a different user you probably need to pull the right authentication information out of the ~user/.Xauthority file. (I typically just copy it). If X isn't running yet, you can probably just start the server with startx.

Once X is running on the server, and your userid has the right cookies to connect to it through copying the Xauthority file (or extracted/merged with xauth), you can simply set the DISPLAY environment variable to :0.

f.i. 'env DISPLAY=:0 xine'
_________________________
40GB - serial #40104051 gpsapp

Top
#147593 - 09/03/2003 15:31 Re: a question about ipforwarding in Linux?? [Re: Roger]
ilDuce
journeyman

Registered: 22/06/2002
Posts: 92
ok.... my bad.... I will try to clarify it a little bit. I will just list my symptoms nad not try to draw my own conclusion. Wich most likely will confuse everybody! including myself!....=)

eth0 points to the public! ([10mbit] i.e the internet) eth1 points to my LAN (100mbit) Communication from eth1 to a client on the LAN gives me full speed! When trying to connect to say the FTP server and sending something to my eth1 interface i only get the 10mbit speed. (actually its a DSL modem connected to eth0 but it doesnt matter)

Thats why I thought maybe that my request was bridged straight through to my ISP and then going back to my server. And therefore I only got the same speed as I have out on the internet.



I have looked at X0rfb before.... But it seems that his site is down or something. Because I wasnt able to get it. Anyways I will try again later.

edit:
ps. I will try the ip route command later. I will post the results. Thanks for the help... ds.


Edited by ilDuce (09/03/2003 15:32)

Top
#147594 - 09/03/2003 15:54 Re: a question about ipforwarding in Linux?? [Re: ilDuce]
jaharkes
enthusiast

Registered: 20/08/2002
Posts: 340
Loc: Pittsburgh, PA
It would be a very good provider if you actually had 10Mbit/s available on the up and downlink. You are more likely to see things in the few hunderd kbits/s range if that were the case. It is more likely that your ftp server can't (won't) do more than 10Mbit/s. Perhaps your disk is using pio transfers and blocking interrupts. hdparm /dev/hda should show the current settings. I typically have to use 'hdparm -u1 -d1 /dev/hda' to get any kind of performance out of an IDE drive.

What also matters somewhat is whether the local lan is connected with switches or hubs. hubs turn the link into a shared medium, the interfaces work half duplex (can't send and receive at the same time) and you actually can get collissions and are affected by other traffic on the lan. Some people force their network cards into full duplex mode on a hub and actually destroy the last bits of performance because the system is now sending acks while still receiving data and therefore causes a considerable amount of collisions. ifconfig eth1 should show the various counters that are useful in diagnosing such problems. You would also see a lot of packet loss when running something like 'ping -f'.
_________________________
40GB - serial #40104051 gpsapp

Top
#147595 - 10/03/2003 04:47 Re: a question about ipforwarding in Linux?? [Re: jaharkes]
ilDuce
journeyman

Registered: 22/06/2002
Posts: 92
It has nothing to do with that.
What I was trying to do was to FTP on a straight 100mbit line. I have a switch on the LAN. And as far as I can se there is no collision problems. As I was saying.... the 10mbit eth0 interface is connected to a dsl modem. Wich gives me about 0.5mbit. Now the problem is that my straight 100mbit connection (with just one client connected) lands on about 0.5mbit. Wich is WAY to low for a 100mbit line.
therefore the communication speeds are as follows (on the LAN)
SERVER ---> CLIENT gives me 100Mbit speed. No problem there.
CLIENT ---> SERVER gives me the same speed as on my public external connection.

I hope this clarifies it.....

Top
#147596 - 10/03/2003 13:33 Re: a question about ipforwarding in Linux?? [Re: ilDuce]
ilDuce
journeyman

Registered: 22/06/2002
Posts: 92
Now I remember why I didnt go with the X0rfbserver.. It doesnt have a viewer for windows... And thats kind of a have to.....=)...

Top
#147597 - 10/03/2003 14:05 Re: a question about ipforwarding in Linux?? [Re: ilDuce]
Roger
carpal tunnel

Registered: 18/01/2000
Posts: 5682
Loc: London, UK
It doesnt have a viewer for windows

Surely the standard vncviewer works with it? It's supposed to.
_________________________
-- roger

Top
#147598 - 10/03/2003 16:28 Re: a question about ipforwarding in Linux?? [Re: Roger]
ilDuce
journeyman

Registered: 22/06/2002
Posts: 92
does it?.... damn... I missed that. I just saw that X0rfb had its own viewer and that it was for unix. Never thought that vncviewer would work!
Thanks!!!

Top