LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General > LinuxAnswers Discussion
User Name
Password
LinuxAnswers Discussion This forum is to discuss articles posted to LinuxAnswers.

Notices


Closed Thread
  Search this Thread
Old 06-03-2004, 12:15 PM   #1
hakcenter
Member
 
Registered: Apr 2003
Location: Not to far from the computer screen
Distribution: RedHat 9.0
Posts: 324

Rep: Reputation: 30
Post DISCUSSION: Linux Router


This thread is to discuss the article titled: Linux Router
 
Old 06-09-2004, 03:29 PM   #2
jcluney
LQ Newbie
 
Registered: Nov 2003
Posts: 4

Rep: Reputation: 0
have a router set up and usind slackware 9.1 eth0 is working fine but i am getting this error on boot up Jun 9 17:15:24 roadrunner kernel: eth1: link down what could be the problem the output of ifconfig is

his is the output of ifconfig

eth0 Link encap:Ethernet HWaddr 00:0A:xx:CD:xx:AD
inet addr:205.xxx.160.xx Bcast:205.251.xx.255 Mask:255.255.252.0 UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1 RX packets:9757 errors:0 dropped:0 overruns:0 frame:0
TX packets:1961 errors:0 dropped:0 overruns:0 carrier:0
collisions:73 txqueuelen:1000
RX bytes:1538741 (1.4 Mb) TX bytes:281166 (274.5 Kb)
Interrupt:11 Base address:0xd800

eth1 Link encap:Ethernet HWaddr 00:40:xx:8A:xx:F1
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0 UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:63 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:10122 (9.8 Kb)
Interrupt:10 Base address:0xcf00

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:6 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:252 (252.0 b) TX bytes:252 (252.0 b)
could some one pleas help me
 
Old 03-14-2005, 02:27 AM   #3
AdamZappal
LQ Newbie
 
Registered: Mar 2002
Location: Leadville, Colorado at 10,200 feet above sea level
Distribution: Red Hat 7.2 Gnome Kernel 2.4.9-31
Posts: 8

Rep: Reputation: 0
other article

in this article he mentions, if we cant ping the machine on the LAN then we have to read another article before proceeding?!! well... what article?
 
Old 04-23-2005, 02:12 PM   #4
maxque
LQ Newbie
 
Registered: Apr 2005
Location: Vancouver
Distribution: Debian
Posts: 28

Rep: Reputation: 15
Lightbulb Re: other article

Quote:
Originally posted by AdamZappal
in this article he mentions, if we cant ping the machine on the
LAN then we have to read another article before proceeding?!!
well... what article?
What is the output from sudo iptables -L ?

If iptables is loaded you will have at least three chains, INPUT, OUTPUT and FORWARD. iptables is installed and loaded. Then try iptables -v -L INPUT , from that if your rules are there you should see some indication of them. Then do the same for the FORWARD chain.

The next thing to check is that your own dhcp server is running and assigning addresses. I have already written my own dhcp.conf file and assigned hardware-ethernet ip addresses specifically to each machine on my network.

This article is pretty sparse, I think they're leaving it up to us to fill in the missing pieces. The other thing I didn't see mentioned was the version of IPtables or the kernel version. There are some changes from the 2.4 to the 2.6 kernel and I'm not sure how this is affecting things either.

I am in the middle of doing just this in hopes of retiring my linksys router and making way for a web server on the other connection I have from my ISP.

cheers,
maxque
 
Old 04-23-2005, 03:36 PM   #5
maxque
LQ Newbie
 
Registered: Apr 2005
Location: Vancouver
Distribution: Debian
Posts: 28

Rep: Reputation: 15
OK, Since I am doing this for real at the moment, I'll post things here in hopes that I'll get some help as I go along and maybe help others to.

IPTABLES are a list of rules which exist in your computer's memory. They can be added and changed on the fly so it makes them very flexible. You can enter the barebones commands from your terminal and they will stay there until you reboot the computer. In real life, a set of rules like this evolve over time and are tweaked and adjusted to meet the current circumstances.

This isn't a very good way of preserving them for next time you boot. The rules can be put into the form of a shell script which you can run by hand as you work on them or set to run when you boot the server, and BEFORE anything else is loaded. Here is the barebones rules in the form of a very simple shell script:

Code:
#!/bin/sh
# First let linux know this is a shell script and how to execute it
# Next, just in case there are any rules sitting in memory we flush everything
/sbin/iptables -F
/sbin/iptables -A INPUT -m state --state INVALID -j DROP
/sbin/iptables -A FORWARD -m state --state INVALID -j DROP
/sbin/iptables -A OUTPUT -m state --state INVALID -j DROP

# Lets know specifically where we intersect  with the Internet
# specifically allow data from our own static IP 
/sbin/iptables -A INPUT -s 216.xxx.xxx.xxx  -j ACCEPT  #for everything
# or you if you don't have a static ip, do it by interface
/sbin/iptables -A INPUT -i eth0 -j ACCEPT

# Since this a router, it might be nice to know which one
/sbin/iptables -A FORWARD -i eth1 -o eth0
/sbin/iptables -A FORWARD -i eth0 -o eth1

/sbin/iptables -P INPUT DROP
/sbin/iptables -P FORWARD DROP

/sbin/iptables -A INPUT -i eth1 -j ACCEPT
/sbin/iptables -A INPUT -i eth0 -m state --state ESTABLISHED,RELATED -j ACCEPT
/sbin/iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
I'll have to figure out the mechanics of the NAT portion as I go. but this is more information. Someone else post here to, I'm right playing this by ear now!

maxque
 
Old 06-06-2005, 04:04 PM   #6
michaelsanford
Member
 
Registered: Feb 2005
Location: Ottawa/Montréal
Distribution: Slackware + Darwin (MacOS X)
Posts: 468

Rep: Reputation: 30
I just wanted to mention something about the subnetting in dhcpd.conf

Code:
ddns-update-style ad-hoc;
option domain-name-servers x.x.x.x;
option routers x.x.x.x;
subnet 10.0.0.0 netmask 255.0.0.0 {
    range 10.0.0.0 10.0.0.100;
}
This would probably be better like this:
Code:
ddns-update-style ad-hoc;
option domain-name-servers x.x.x.x;
option routers x.x.x.x;
subnet 10.0.0.0 netmask 255.255.255.0 {
    range 10.0.0.2 10.0.0.100;
}
That way the subnet matches the range of network addresses allowed (since you originally had a subnet mask allowing 10.0.0.1 to 10.254.254.254 but were only addressing 10.0.0.1 to 10.0.0.100). Also you shouldn't really bound a range with 10.0.0.0 (or with any address with a zero-byte fourth octet) because that's a reserved address, and make sure that your router (which I assume has a dhcpd-side interface of 10.0.0.1 ?) doesn't pass out an IP address that's the same as the interface.

It won't actually pass out an address that's already in use and it won't pass out a network address (10.0.0.0) to a client host, this is just tying up loose ends so to speak.

Also, for those of us who don't have /etc/sysctl.conf (like Slackware) you can use this to enable Iipv4_forwarding. You can put this in a startup script to make the change permanent across reboots:
Code:
/bin/echo "1" > /proc/sys/net/ipv4/ip_forward
Just my 0,02 $, still a good guide!
 
Old 10-17-2005, 01:04 AM   #7
jp_durai
LQ Newbie
 
Registered: Aug 2005
Posts: 8

Rep: Reputation: 0
regarding other article

in this article he mentions, if we cant ping the machine on the LAN then we have to read another article before proceeding?!! well... what article?
 
Old 11-04-2005, 06:53 AM   #8
jp_durai
LQ Newbie
 
Registered: Aug 2005
Posts: 8

Rep: Reputation: 0
I have installed fedora 4 with two ethernet cards for making a router and configured.If i ping a pc connected with eth0, it replies. but pinging pcs connected with eth1 replies unreachable destination. what may be the problem .If any body knows pls reply.
 
Old 11-12-2005, 01:24 AM   #9
srnerkar1
Member
 
Registered: Nov 2005
Location: nagpur
Posts: 33

Rep: Reputation: 15
Question ftp access through router

good afternoon everybody,
I have certain questions in my mind about the router. I am using squid server with that i am able to access internet . That squid server is having 2 NIC connected to local and outside network but problem occures when i want to upload data from the local systems in LAN to my private web site through SQUID server it wont allow me to do so
So sir, can that problem be sovled by setting that squid server as a LINUX ROUTER.......................
Please suggest any solution if any rather than this..........
 
Old 03-12-2007, 08:44 AM   #10
Avatar
Member
 
Registered: May 2001
Location: Canada
Distribution: old ones
Posts: 555

Rep: Reputation: 33
LInux router article missing

Has this article been removed? I only see the first paragraph then it cuts off.
 
Old 03-19-2007, 08:06 PM   #11
Davschm
LQ Newbie
 
Registered: Sep 2002
Posts: 16

Rep: Reputation: 0
Same, i cant read this artical.
 
Old 05-03-2007, 11:50 PM   #12
UhhMaybe
Member
 
Registered: Jul 2004
Location: Salt Lake City, Utah
Distribution: Absolute 12.0 Studio 64 1.3.0
Posts: 470

Rep: Reputation: 30
Cool

maxque the differences between the two kernels are as big as what YOU need within the kernel's. They are configurable. They are Sometimes interchangeable. Not Always. The IPChains software is not the same as IPTables. See http://www.wiki.com/ and http://tldp.org/HOWTO/HOWTO-INDEX/howtos.html
 
  


Closed Thread



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
DISCUSSION: Using Linux to backup and recover Windows and Linux systems shshjun LinuxAnswers Discussion 3 12-05-2009 09:42 PM
Small Linux Router/firewall behind D-Link Hardware router dleidlein Linux - Networking 6 04-30-2007 05:12 AM
DISCUSSION: WinModems and Linux peace LinuxAnswers Discussion 8 06-01-2005 06:01 PM
Linux Router & Netgear Wireless Router DMaCATO Linux - Wireless Networking 1 04-30-2004 09:16 AM
/etc/resolv.conf configuration when behind a router(not a linux router) rmanocha Linux - Networking 2 04-28-2004 01:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General > LinuxAnswers Discussion

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration