LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 09-09-2009, 02:55 PM   #1
cocchiararo
LQ Newbie
 
Registered: Apr 2008
Posts: 29

Rep: Reputation: 15
SOLVED bridge-utils / dnsmasq / iptables / debian => internet sharing problems


So... my learning adventures go like this:

asrock 939DUAL-SATA2
athlon 64 3500+
2gb ddr 400
nvidia 6200 AGP

NICS:

3 x realtek pci gigabit nic
1 x onboard gigabit nic
1 x agere pci express gigabit nic (squeeze has default drivers for it, lenny does not, if i plug the pci nics, this one wont work unless i compile and install the drivers)

ADSL modem-router configured only as modem (pppoe) for Jdownloader to be able to reset the connection for ip changing.

DISTRO: DEBIAN (first lenny, now squeeze).

this machine will be a firewall, router, torrent/direct downlaod machine, and maybe more, in my house.
-----------------------------------------------------------------------
a note of the past:

I had the pci nics on an older machine (1 more pci nic there), with centos 5.3. Bridge-utilities, iptables, dnsmasq, torrentflux, ssh, vnc, xrdp, and many more things. It worked like a charm.

i REALLY preffer the GUI tools for managing the network in centos, and also the services GUI tool, and how the startup of each "thing" from init.d via the rc*.d is shown when starting the computer, but i want to learn debian now
----------------------------------------------------------------------

When i installed debian 5 (lenny), i struggled a bit, and ended up with a config that would not work after a reboot.

setting the bridge "the debian way" (in interfaces) reported that it was not possible to bring "br0" up, but it was really up afterall.

That debian 5 (lenny) install was made without the "modules=ppp-udeb" extra, so i had to install pppoeconf in order to be able to use the pppoe modem.

After running pppoeconf, i had internet, in the "server", and in the "clients" (i had the bridge, dnsmasq, ipmasq, etc, installed and working). no problems.

But after a reboot, it was gone. ppp0 apeared as connected when i executed the "ifconfig" command, but i couldnt browse, ping (by ip or name), etc. Not from the server, much less from the clients.

That installation had some problems with softirqd using like 25% cpu time... all the time. that was "fixed" by adding nohz=off to the boot parameters, and i read that it was also fixed in kernel 2.6.30 (wich i later confirmed when i installed squeeze), then, i broke the server, i had to reinstall, and went ahead and installed squeeze.

In centos, everything was fine if i gave an ip manually to the eth interface conected to the modem, or if i left it with no ip, or if i set it up with dhcp.

In debian, it seems to only work if i leave it with no ip (but up), if i dont do that, i have no internet in any computer.

below, is the interfaces config. file, from my lenny install.
Code:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
#allow-hotplug eth3
#iface eth3 inet dhcp

auto br0
       iface br0 inet static
           address 192.168.1.254
           network 192.168.1.0
           netmask 255.255.255.0
           broadcast 192.168.1.255
           gateway 10.0.0.2
           bridge_ports eth0 eth1 eth2 eth4
	   bridge_stp off

auto dsl-provider
iface dsl-provider inet ppp
pre-up /sbin/ifconfig eth3 up # line maintained by pppoeconf
provider dsl-provider

auto eth3
iface eth3 inet manual
and this is how i did it on centos (only the bridge part, and this method kind of works in debian too)

Code:
brctl addbr br0
brctl stp br0 off
brctl setfd br0 0
brctl addif br0 eth0
brctl addif br0 eth1
brctl addif br0 eth2
brctl addif br0 eth4
ifconfig eth0 down
ifconfig eth1 down
ifconfig eth2 down
ifconfig eth4 down
ifconfig eth0 0.0.0.0 up
ifconfig eth1 0.0.0.0 up
ifconfig eth2 0.0.0.0 up
ifconfig eth4 0.0.0.0 up
ifconfig br0 192.168.1.254 up
As you can see, i have no gateway section there, and i believe that adding it only worked when the eth3 (the one conected to the modem) had an ip (10.0.0.3), if not, it wouldnt work.

Now, in squeeze, i see no ipmasq package in synaptic (or apt-get, aptitude, whatever). I manually set the sysctl.conf option for ipv4 forwarding to 1.

i was SUPER happy, cause either by using the "debian way", or the other way, i had internet in the server, the bridge was up, DHCP (from dnsmasq) worked, my iptables rules that worked on centos, worked on debian (lenny), and now on squeeze, internet was working after a reboot,and ... the unexpected happened...

my client machines could ping anything.

but could only BROWSE GOOGLE RELATED STUFF ! (gmail, google, google docs, etc), nad slowly, i could load hotmail login page, but nothing more.

i spend the whole day yesterday with this, and couldnt solve it

one of the old HDDS i had on the server died, so i have to reinstall (it was used as /home).

so i cant provide more acurate info, but any ideas would really be appreciated !

pd: i was unable to configure the pppoe connection using the gui tools from the network manager under Debian 5 (lenny), i didnt try under squeeze, but in lenny, the eth device reverted to eth4 after accepting the config (the modem was on eth3), and the connection turned into a dial up one, insted of pppoe :/

SOLVED

Last edited by cocchiararo; 09-17-2009 at 07:28 PM. Reason: SOLVED
 
Old 09-09-2009, 03:01 PM   #2
evilted
Member
 
Registered: Aug 2009
Location: Ouagadougou, Burkina Faso
Distribution: centos
Posts: 92

Rep: Reputation: 18
Quote:
Originally Posted by cocchiararo View Post
my client machines could ping anything.

but could only BROWSE GOOGLE RELATED STUFF ! (gmail, google, google docs, etc), nad slowly, i could load hotmail login page, but nothing more

sounds like dns. if you can ping a remote ip, not google, and get a response then sure its dns. try
Code:
ping 4.2.2.2
ping yahoo.com

Last edited by evilted; 09-09-2009 at 03:04 PM. Reason: added tags
 
Old 09-09-2009, 03:18 PM   #3
cocchiararo
LQ Newbie
 
Registered: Apr 2008
Posts: 29

Original Poster
Rep: Reputation: 15
but i could ping the web pages that i could not load too (from the clients), or so i remember

either way, i have to rebuild the server today when i get home.

if it was indeed a dns problem, would it be in DNSMASQ ? since the server was able to load any webpage.

pd: i also tried loading a webpage by its ip, and that failed too
 
Old 09-11-2009, 10:54 AM   #4
cocchiararo
LQ Newbie
 
Registered: Apr 2008
Posts: 29

Original Poster
Rep: Reputation: 15
Im back in lenny now.

but before leaving squeeze, i confirmed that after the installation, the pppoe connection was not working again, but if i disabled network-manager, it works upon rebooting.

also, if i configure the bridge, dnsmasq, etc, the same thing i explained (i can only browse google, and a few other webpages, but i can ping/nslookup all the ones that i can browse, from the clients).

now, if i do a pppoeconf, all is good, until i reboot.
 
Old 09-17-2009, 07:09 PM   #5
evilted
Member
 
Registered: Aug 2009
Location: Ouagadougou, Burkina Faso
Distribution: centos
Posts: 92

Rep: Reputation: 18
Quote:
Originally Posted by cocchiararo View Post
So... my learning adventures go like this:
Quote:
Originally Posted by cocchiararo View Post
i REALLY preffer the GUI tools for managing the network in centos, and also the services GUI tool, and how the startup of each "thing" from init.d via the rc*.d is shown when starting the computer, but i want to learn debian now
Quote:
Originally Posted by cocchiararo View Post
i spend the whole day yesterday with this, and couldnt solve it

its simple, go back to cent - it works, and wont give you a head ache.

Last edited by evilted; 09-17-2009 at 07:12 PM.
 
Old 09-17-2009, 07:27 PM   #6
cocchiararo
LQ Newbie
 
Registered: Apr 2008
Posts: 29

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by evilted View Post
its simple, go back to cent - it works, and wont give you a head ache.
mmm, you could have said that before, i have it working in debian now :/
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
dnsmasq and internet sharing johnh10000 Linux - Networking 0 05-23-2009 04:43 AM
Debian bridge-utils via /etc/network/interfaces uhcafigdc Linux - Networking 3 12-10-2008 01:24 PM
internet connection sharing through bridge positiveinflux Linux - Networking 6 04-03-2007 11:16 PM
Problems with iptables not allowing internet sharing. ryedunn Linux - Networking 19 02-10-2005 07:23 PM
Internet Sharing & nic bridge? darchon Linux - Networking 21 03-29-2003 03:00 AM


All times are GMT -5. The time now is 03:29 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration