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.
I know what you are thinking, there are countless posts on this topic, but I think I did a simple but a "should-working" configuration and it is somehow not working ;-) ... (I can't find the fault)
Well I have to laptops both running slackware 12.0. One is the server and is online via ppp0 (DSL so it uses eth0 - udev rules are making sure of that) this server has another card (eth1 - pcmcia) with a crossover cable to the client.
Then like in Pat's mail to root my rc.firewall looks like this:
Code:
# Others like "nat" must be explicitly stated.
iptables --flush
# Flush all the rules in filter and nat tables
iptables --table nat --flush
# Delete all chains that are not in default filter and nat table
iptables --delete-chain
iptables --table nat --delete-chain
# Set up IP FORWARDing and Masquerading
iptables -t nat -A POSTROUTING -o ppp0 -s 192.168.0.0/16 -j MASQUERADE
iptables -A FORWARD -o ppp0 -p TCP --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu
iptables --append FORWARD --in-interface eth1 -j ACCEPT
there is no line about ipforwarding, because rc.ip_forward is 755.
This line with clamp-mss-to-pmtu I found somewhere on the net, but it is not helping really - I could leave this away ...
The rc.dnsmasq is also 755.
If I do something like:
On the client side I did nothing but a netconfig with dhcp.
So my problem is that the internet connection of the client is sometimes ok, sometimes really bad. I can have good traffic on my lan (intern) with about 5000kb/s (rsync ssh) but it is also on the same day possible that irssi is giving Server Lags of 3 to 4, while connected to a chatserver on my server (intern) and surfing with a browser is a pain.
Something is not working here and I can't find the fault, if someone could help me I would be really thankful.
no, that's not what i'm thinking at all. i'm thinking since when did dnsmasq have anythign at all to do with routing...? you've mixed up a lot of unrelated things into a bit of a confusing mess... are you getting suitable IP addresses reguarly? if so then dnsmasq is totally irrelevant. divide and conquer!
slackware as a router using iptables and dnsmasq for dhcp
well you are absolutely right, the title is stupid it should be something like: "slackware as a router using iptables and dnsmasq for dhcp" ...
would be better I think.
So I use dnsmasq as a dhcpd (on server) for my client, but to solve my connection problems it might be clever do switch to static ip on the client and stop rc.dnsmasq - I did this now.
But it seems that it has nothing to do with dnsmasq, because my connection problem persists. Is my rc.firewall correct? Is there something else to edit/configure?
Thank you for that guide I will definitely try this out!
If I look at the output of http://www.slackware.com/~alien/efg/ it get's clear to me - the art of iptables is described far too easy in Pats mail to root ;-)
well i tried this guide, i dont use dnsmasq anymore simply dhcpd and the iptables script from Alien Bob, but my connection problems persist.
as an example:
i browse the net with firefox and it works kind of slow, but it works. than i open a terminal and try to login via ssh into that server'n'router, that works too, but it needs about 12 sec untill it logs in - so i have than a really slow connection also with firefox than.
the same happens with other applications i really dont think its related to ssh or something.
it is also not that my cable is too long, because i used the same cable with a normal router (some cheap box with a DSLmodem inside), now i just have a very short crossover cable in between too.
the box i use for the server'n'router is a T20 with 700Mhz and 256MB RAM and the client has even more Mhz and RAM, so this should not be the issue i think?
Is the cable you're using new and undamaged ? Are both cards new and in working order ? (clean, no dust all over them)
The cable is new and worked with my old router (commecial box).
One card is laptop internal (thinkpad X30) and the other one is a pcmcia card - i had the same problem with another pcmcia card i have (tested both).
Also I tested a different laptop as a server'n'router with the same pcmcia cards and it was the same - thats why I thought it isnt a hardware problem ...
If you look at http://amor.rz.hu-berlin.de/~rheinwaa/ping.png you see the ping statistics as a plot - as you can see on some times ping needs very long and on some times not, there is nothing much in between. The long ping times are to the same time where I try to access a website with pictures or so ...
So the connection of the server to the internet is just fine, right ? It's only the connection of the internal network client to the server that is slow ?
Now, they solved the problem by 'rmmod' ing some acpi modules, like 'processor'. Maybe try that on the server ? It may be all of ACPI that is the problem, in which case you may want to try APM.
Last edited by H_TeXMeX_H; 11-12-2007 at 03:13 PM.
Thanks for your reply, I was not able to test it, now I am ...
... I recompiled my kernel on server'n'router with static apm and no acpi at all.
At first it looked like performance would be better, so I opened up a rsync connection with bwlimit=999 to get some traffic and the good news is untill now there are no errors, overruns and dropped pakets, but the connection is as bad as before:
So maybe acpi is responsible for the errors, but why is my connection still that bad? The connection from the server to the internet is just fine (goes over eth0, ppp0).
Oh I wanted to press `Submit Reply' but thought maybe now is something interesting about 8139too in dmesg, after changing to apm and indeed there is nor a lot of stuff ...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.