LinuxQuestions.org
Help answer threads with 0 replies.
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 11-22-2002, 09:31 PM   #1
falconxlc
LQ Newbie
 
Registered: Nov 2002
Posts: 9

Rep: Reputation: 0
Post Redhat 8.0 as a Router


Before you begin to assess my problem, I would like to thank you for taking the time to read my concern.

My computer has:

amd 750
tnt2 m64
15 gig hd
2 ethernet cards
Cable modem connection to the internet

I would like to setup this computer as a Linux RH Box so other computers can use the internet through this computer.


SETTING UP DHCP
---------------

So far i have install everything on the 3 redhat8.0 cds.
The two network cards were installed fine and one of them(eth0) is connected to the cable modem. The other one has manually assigned ip, subnetmask, and def gateway. so basically:

eth0 - ip/subnetmask all assigned from ISP
eth1 - ip=192.168.0.1
submask= 255.255.255.0
gateway= 192.168.0.1

I followed steps on the mini dhcp server setup
http://www.tldp.org/HOWTO/mini/DHCP/x369.html

I have setup dhcp on eth1 and my dhcp.conf looks like this:

/etc/dhcp.conf
-------------------------------------------------
# Sample /etc/dhcpd.conf
# (add your comments here)
ddns-update-style interim;
default-lease-time 720;
max-lease-time 86400;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.0.255;

#router is the ip add of my eth1?
option routers 192.168.0.1;

#doman names of my isp - gotten from /etc/resolv.conf
option domain-name-servers 167.206.3.143, 167.206.112.138, 167.206.7.4;
#option domain-name-servers 192.168.0.1;
option domain-name "falconxlc.org";

#assign internal networks ips ranging from 192.168.0.10-254
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.10 192.168.0.100;
range 192.168.0.150 192.168.0.200;
}
------------------------------------------------------

My other computer is running windows 98 and when it boots up it receives an assigned ip address based on this script.


ROUTING
-------

Ok, so now...ideally i would like to have every computer that is connected to this dhcp server to be able to access the internet, so i tried to setup Linux IP Masquerade by following instructions at:

http://ipmasq.cjb.net/

i have a firewall ruleset running using iptables

and following that my /sbin/route -n output looks like:

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
xx.xxx.128.0 0.0.0.0 255.255.248.0 U 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 xx.xxx.128.1 0.0.0.0 UG 0 0 0 eth0

(my real ip is hidden under the x)


ok well, now everything shoudl work but it doesnt....and my questions are:

1) should I have manually setup my ip address for my ethernet card(eth1) which is the dhcp server? if so, what should the gateway be set to?

2) In my dhcp.conf file, the options route should point to the ip address of eth1 (192.168.0.1). if not, what should it point to?

3) How to set it up so that my win98 computer can connect to the internet? It doesn't work as of now. Though, it can ping my eth1 computer.

If you want me to show you any file or output of a command please post it and i will let you know.

Thanks
 
Old 11-23-2002, 12:46 AM   #2
falconxlc
LQ Newbie
 
Registered: Nov 2002
Posts: 9

Original Poster
Rep: Reputation: 0
found solution here:

http://docs.myjabber.net/howto/ip-Tables.htm


my iptables were setup wrong...but dhcp was ok
 
Old 11-23-2002, 12:03 PM   #3
Ciccio
Member
 
Registered: Nov 2002
Location: Paraguay
Distribution: Mandrake 10
Posts: 573

Rep: Reputation: 30
#Enable Forwarding in kernel
echo 1 >/proc/sys/net/ipv4/ip_forward

#Disable IP spoofing attacks
echo 2 > /proc/sys/net/ipv4/conf/all/rp_filter

#Don't respond to broadcast pings (Smurf Amplifier Protection)
echo "1" > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts

#Block source routing
echo 0 > /proc/sys/net/ipv4/conf/all/accept_source_route

#Kill timestamps
echo 0 > /proc/sys/net/ipv4/tcp_timestamps

#Enable SYN cookies
echo 1 > /proc/sys/net/ipv4/tcp_syncookies

#Kill Redirects
echo 0 > /proc/sys/net/ipv4/conf/all/accept_redirects

#Enable bad error message protection
echo 1 > /proc/sys/net/ipv4/icmp_ignore_bogus_error_responses

#Log martians (packets with impossible addresses)
echo 1 > /proc/sys/net/ipv4/conf/all/log_martians

#Reduce DoS'ing ability by reducing timeouts
echo 30 > /proc/sys/net/ipv4/tcp_fin_timeout
echo 2400 > /proc/sys/net/ipv4/tcp_keepalive_time
echo 0 > /proc/sys/net/ipv4/tcp_windows_scaling
echo 0 > /proc/sys/net/ipv4/tcp_sack

add those to /etc/rc.d/rc.local and restart (network) then you should be able to do it.
 
  


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
Configuring Router on redhat 9 purikk Linux - Networking 2 10-11-2004 05:42 PM
redhat 7.1 as a router aristeidis Linux - Networking 0 03-22-2004 07:16 AM
can't see outside behind Redhat router KitM Linux - Networking 7 01-20-2004 06:46 PM
RedHat 7.3 Router komakala Linux - Networking 2 10-24-2003 04:09 PM
Setting up a router with RedHat 7.2 StanET Linux - Networking 2 02-03-2003 07:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:18 AM.

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