Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
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.
Maybe this is too much detail, but... I have a problem that I have spent weeks trying to resolve...
I had a perfectly running network using CentOS3, but I fresh installed CentOS5 to get USB support...now I can not get my network working the
way I had it working before!
I have my linux box connected to the the FIOS modem via eth1 and my internal network of PCs connected to the linux box via eth0.
From the PCs, I can not get to the internet. It seems that internal packets are not getting routed to eth1 on the box to the modem.
Obviously,I have a routing problem, but I am too 'linux new' to figure it out and need someones help. And, after days of searching, I can't seem to find a good example of my setup. This should be a common setup and should be in a wiki...
Here is the setup:
modem is 10.1.3.2
eth1 is 10.1.3.1
eth0 is 10.1.2.1
[root@ooorahhome Desktop]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.1.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
10.1.3.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
0.0.0.0 10.1.3.2 0.0.0.0 UG 0 0 0 eth1
Also, why does 169.254.0.0 get auto created whenever I restart the network?
[root@ooorahhome etc]# iptables -L -v
Chain INPUT (policy DROP 24910 packets, 22M bytes)
pkts bytes target prot opt in out source destination
2547 315K ACCEPT all -- lo any anywhere anywhere
26018 22M ACCEPT all -- eth0 any anywhere anywhere
9534 6222K ACCEPT all -- any any anywhere anywhere state RELATED,ESTABLISHED
Chain FORWARD (policy DROP 7413 packets, 597K bytes)
pkts bytes target prot opt in out source destination
1277 90704 ACCEPT all -- eth0 any anywhere anywhere
Sorry, that the suggestion didn't help. I have enough items here that numbering them may help. Feel free to save space & typing by just referring to the number.
Did you overwrite the CentOS 3 installation when you did the fresh install of 5?
"Obviously" someone changed something between 3 & 5,
Do you have access to the changelog(s) to try to figure out if there was a change in the default set-up?
Has CentOS followed Fedora's lead & turned on SELinux by default?
I doubt it matters, but what is a "FIOS modem"?
Quote:
From the PCs, I can not get to the internet.
-- I assume that the CentOS box can ping in either direction & surf if you wanted it to.
I don't have /etc/sysconfig/networking/devices/ifcfg-ethn files (SimplyMEPIS 6.0), what do they do? Are they merely descriptive or do they prescribe the configuration of the interfaces?
Please edit your post to put the output of route -n in "Code:" blocks -- I can't read it in its current format.
I see no "MASQUERADE" lines in your iptables output,
How were the rules set up? (Shorewall?, GuardDog?, etc.?)
Have you tried, do you dare to, temporarily disabling them?
What does iptables -t nat -L show?
Last edited by archtoad6; 12-19-2007 at 02:39 PM.
Reason: fix wording
1. Yes. I I reformatted the discs and installed CentOS5
2a. If the change log exists on my system, then I have access to it.
2b. Not positive, but I believe they follow the upstream very closely. So, I would guess yes, but don't know how to determine.
3. Sorry...FIOS is the Verizon fiber feeding high speed access to my home.
4. Yes.
5. Exactly.
6. I found the command online during my search for a solution. I do believe the files list the configuration.
7. Not sure what you mean, "Code:" blocks. I tried to edit it below...
[root@ooorahhome Desktop]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.1.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
10.1.3.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
0.0.0.0 10.1.3.2 0.0.0.0 UG 0 0 0 eth1
8.
Chain POSTROUTING (policy ACCEPT 560 packets, 91563 bytes)
pkts bytes target prot opt in out source destination
2752 240K MASQUERADE all -- any eth1 anywhere anywhere
8a. I followed a HowTo Wiki off the CentOS website.
8b. The original installation had a more complicated table of rules. Not sure if they were more or less restrictive, but I still had the problem then. I could turn them off for debugging.
8c. That command lists the rules for handling NAT.
I chose not to do an upgrade of CentOS 3.3 on our servers. Rather, I backed up the configuration files and user data and performed a clean installation. The hardware on which I was running the operating system is all certified for RHEL, so there were no problems there. The only default I changed was to turn off SELinux.
I liked the idea, but I still cannot access the internet from the PCs.
I also decided to turn off ipv6:
1 - append "alias net-pf-10 off" to the end of /etc/modprobe.conf
2 - set IPV6INIT=no in /etc/sysconfig/network-scripts/ifcfg-eth0 and /etc/sysconfig/network-scripts/ifcfg-eth1
3 - comment out "::1 localhost6.localdomain6 localhost6" in /etc/hosts
4 - reboot
Also, why does 169.254.0.0 get auto created whenever I restart the network?
Tom
Please make my day!
hi,
try delete that bold part in ifcfg-eth0 (you dont need that gateway - that is only for eth1) - and restart network.
your iptables seems ok to me.
169.254 subnet - taking the advantage of MS reserved ip block for networking.
I had a perfectly running network using CentOS3, but I fresh installed CentOS5 to get USB support...now I can not get my network working the way I had it working before!
That is, you did a fresh install of CentOS 5 on the same partition, overwriting the old CentOS 3.
I have have posted various clarification Q's, you have dutifully & uncomplaining answered. I have suggested fixes, they haven't worked; others have suggested other fixes, they haven't worked either.
I'm reasonably sure the cause of the problem is in my Q#2 above. Either a change introduced by CentOS, or by your answers to the installer. If you want track this down, the changelogs I spoke of should be on the CentOS web site.
I have new Q's:
What is this box used for?
-- Particularly, is it a dedicated firewall?
Why is USB support important?
I think your options are:
Wait for more suggestions here.
Post on a CentOS forum.
Re-install CentOS 5 very carefully, looking for options whose answers may have caused the problem.
Re-install CentOS 3, trying to get back to where you were.
If this is a dedicated firewall & USB is that important, consider IPCop instead. (IPCop 1.4.16 definitely supports USB for saving configuration data.)
If you try C. or D. (or E., for that matter) do it w/o trashing the current install, if at all possible. Use a new partition, a new drive, a different box.
Firewall (FW)/Production Box Notes
For the last 2 or 3 years I have been running SmoothWall Express 2 (SWE 2) as the perimeter FW for my home LAN. It has worked well, but SWE 3 is out & it's time for a change. I'm going about it very conservatively. I have considered my options & my new FW will be either SWE 3 or IPCop. I'm putting SWE 3 on a new FW box & testing it, when I'm happy w/ it I'll swap it into my LAN. Then I'll install IPCop on the old FW box & test it. If I like it better, I'll swap again. After I'm convinced I've made the right choice, I will put the same distro on each box, put the new one into production, & hold the old one as a spare. This isn't just some "What I would do . . .", but what I am actually doing. Your circumstances may be different & YMMV. However, even if your CentOS box is not a dedicated perimeter FW, it looks like a production box & there may be, I hope gentle, lessons here.
When I installed OS5 I reformatted the disk into one partition unlike my install of OS3. It was just easier.
There was something new during the install. It asked me about the level of security. I chose the default. I think that answer turned on SElinux and set up the default iptables, but I am not sure. Besides, I rewrote the iptables rules and you helped me turn off SElinux.
I use the box as both a firewall and file server for my home network. It has hardware raid and I like the idea of having backed up data...
USB: the (noisy) box is located in a semi-convenient place far from where I wanted the monitor (telephone desk). I run two USB extenders over Cat5 for the keyboard and mouse. OS3 does not have USB support - it barely had mouse wheel support.
I'll search for a solution for a little while longer. I did post on CentOS forum with less response than here. I won't reinstall OS5 - it was painful (newbie) - or OS3 (USB), but thanks for the suggestions. I may go that route instead.
Well, that last suggestion got me thinking. I had set the FORWARD chain default to DROP. Once I set it to ACCEPT, it worked. I was able to get internet with the PC network...but now I don't know if my firewall is actually useful.
Any thoughts?
Saving firewall rules to /etc/sysconfig/iptables: [ OK ]
Chain INPUT (policy DROP 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 ACCEPT all -- lo any anywhere anywhere
0 0 ACCEPT all -- eth0 any anywhere anywhere
0 0 ACCEPT all -- any any anywhere anywhere state RELATED,ESTABLISHED
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 ACCEPT all -- eth0 any anywhere anywhere
Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain PREROUTING (policy ACCEPT 57648 packets, 3403K bytes)
pkts bytes target prot opt in out source destination
Chain POSTROUTING (policy ACCEPT 139 packets, 13978 bytes)
pkts bytes target prot opt in out source destination
0 0 MASQUERADE all -- any eth1 anywhere anywhere
Chain OUTPUT (policy ACCEPT 1690 packets, 119K bytes)
pkts bytes target prot opt in out source destination
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.