LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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-29-2006, 04:14 PM   #1
davidolaj
LQ Newbie
 
Registered: Nov 2006
Posts: 8

Rep: Reputation: 0
Network Router


Hi,

Please I want to use Fedora Core build a secure router on my network to distribute internet access to other people via my office internet.

Someone should please tell me how to build the router with the Fedora Core!

David.
 
Old 11-29-2006, 05:16 PM   #2
jantman
Member
 
Registered: Nov 2005
Location: New Jersey, USA
Distribution: SuSE
Posts: 492

Rep: Reputation: 31
Quote:
Originally Posted by davidolaj
Please I want to use Fedora Core build a secure router on my network to distribute internet access to other people via my office internet.
David,

Could you be a little more descriptive and clear? I'm getting a bit lost. What is the difference between "your network" and the "officer internet"? Do you mean that you just want to build a router for your office? Or is there something I'm missing?

-Jason
 
Old 11-29-2006, 05:23 PM   #3
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
Check out this site to build a firewall router. Just answer the questions it ask.

Then once the script is built and saved to /etc as ' firewall.sh '.
Also it must have the executae permission set as well. ' chmod +x /etc/firewall.sh '
Now do the following.
Disable the default Fedora firewall script. ' chkconfig --level 345 iptables off '
Stop the iptables. ' service iptables stop '
Then goto /etc and type. ' ./firewall.sh ' Will need to be run as root.

To make it startup on bootup add the line ' /etc/firewall.sh ' to the bottom of /etc/rc.local file.

Brian
 
Old 11-29-2006, 05:41 PM   #4
davidolaj
LQ Newbie
 
Registered: Nov 2006
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by jantman
David,

Could you be a little more descriptive and clear? I'm getting a bit lost. What is the difference between "your network" and the "officer internet"? Do you mean that you just want to build a router for your office? Or is there something I'm missing?

-Jason
Thank you Jason...

I mean the same network.

Let me explain more...

I have broadband internet in my office assigned with public ip address as xx.xx.xx.11/29

Now I have Fedora Core box with 2 NIC and I assigned xx.xx.xx.13/29 to eth0, I also assigned 192.168.2.1/29 to eth2. I used cross cable to connect my laptop direct to the Fedora Core box eth1 and assigned 192.168.2.2/29 on the laptop but I can not access internet from the laptop. When I ping 192.168.2.1 from my laptop, it reply fine but pinging xx.xx.xx.11 time out.

Please what should enable on the Fedora Core box to work as router/server on the network?

Note: I'm just new to linux configuration!

David.
 
Old 11-29-2006, 05:50 PM   #5
davidolaj
LQ Newbie
 
Registered: Nov 2006
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Brian1
Check out this site to build a firewall router. Just answer the questions it ask.

Then once the script is built and saved to /etc as ' firewall.sh '.
Also it must have the executae permission set as well. ' chmod +x /etc/firewall.sh '
Now do the following.
Disable the default Fedora firewall script. ' chkconfig --level 345 iptables off '
Stop the iptables. ' service iptables stop '
Then goto /etc and type. ' ./firewall.sh ' Will need to be run as root.

To make it startup on bootup add the line ' /etc/firewall.sh ' to the bottom of /etc/rc.local file.

Brian
Hi Brian,

Please explain in simple way! I mean the way I can easily catch up with the scripts/configuration...

David.
 
Old 11-29-2006, 05:54 PM   #6
fordeck
Member
 
Registered: Oct 2006
Location: Utah
Posts: 520

Rep: Reputation: 61
Edit...: What OS are you running on your laptop?

If it is running Linux can you post the results of:

Code:
route -n
If it is running Windows can you post the results of:

Code:
route print

Last edited by fordeck; 11-29-2006 at 06:05 PM.
 
Old 11-29-2006, 06:20 PM   #7
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
A bit confused on your public IP. xxx.xxx.xxx.11/29 Is the following correct?
I will use a random IP address 12.33.44.11/29
Code:
Address:   12.33.44.11          00001100.00100001.00101100.00001 011
Netmask:   255.255.255.248 = 29 11111111.11111111.11111111.11111 000
Wildcard:  0.0.0.7              00000000.00000000.00000000.00000 111
=>
Network:   12.33.44.8/29        00001100.00100001.00101100.00001 000
HostMin:   12.33.44.9           00001100.00100001.00101100.00001 001
HostMax:   12.33.44.14          00001100.00100001.00101100.00001 110
Broadcast: 12.33.44.15          00001100.00100001.00101100.00001 111
Hosts/Net: 6                     Class A
So you available IPs from 9 to 14 correct?

So you set the eth0 IP to xxx.xxx.xxx.13?
What is xxx.xxx.xxx.11? Another machine?

So you should be able to ping xxx.xxx.xxx.13 but not sure of xxx.xxx.xxx.11.
Can you ping xxx.xxx.xxx.13 from the laptop connected to eth1?

One thing I would do is set the 192.168.2.0 Class C to a full class C to make use of 254 IPs. 192.168.2.0/24 to have 192.168.2.1 through 192.168.1.254.


Maybe this is what you are needing.
Now have you enabled IP masquerading to allow network data from eth1 to pass on to eth0?

Lets stop there for now. This thread can go so many ways without specifically what you want. Lets take it one step at a time.

Brian
 
Old 11-29-2006, 06:37 PM   #8
davidolaj
LQ Newbie
 
Registered: Nov 2006
Posts: 8

Original Poster
Rep: Reputation: 0
Brian..

I only use the ip addresses as samples they're not correct ip addresses.

I think what I need is how to enable fedora core IP masquerading to allow network data from eth1 to pass on to eth0!

Please tell me how to enable the fedora core IP masquerading..

David.
 
Old 11-29-2006, 06:50 PM   #9
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
Ok simply run this command first.
echo "1" > /proc/sys/net/ipv4/ip_forward

Then run this command.
/sbin/iptables -A FORWARD -i eth1 -j ACCEPT

Found this from here. http://www.redhat.com/docs/manuals/l...ide/ch-fw.html

If going by the first post and entering the info to build a gateway will do the same.

Brian
 
Old 11-29-2006, 08:31 PM   #10
jantman
Member
 
Registered: Nov 2005
Location: New Jersey, USA
Distribution: SuSE
Posts: 492

Rep: Reputation: 31
Brian,

Your advice is indeed correct, but a bit simplistic for my taste.

David,

There are a lot of security issues with connecting a system to a broadband connection. You really should have a decent firewall. While this is possible with Fedora, the easiest solution is to download a distribution like IPCop. The installation is very easy, and it will handle all of the routing and firewall functions with easy setup.

Personally, I've done multiple experiments with routers, and always found a pre-made distribution easiest.

On the other hand, I'm sure there's a reason why you chose Fedora. I have EVERY linux box on my network running SuSE, and it's much easier to have a heterogeneous Linux setup, where administration, logging, monitoring, and updates are the same. In this case, I would highly recommend that you do a search online for a router/firewall HOWTO for FC, as these delve into the details of configuration and installation.

-Jason
 
Old 11-30-2006, 08:33 AM   #11
amitsharma_26
Member
 
Registered: Sep 2005
Location: New delhi
Distribution: RHEL 3.0/4.0
Posts: 777

Rep: Reputation: 31
Quote:
Originally Posted by davidolaj
Please I want to use Fedora Core build a secure router on my network to distribute internet access to other people via my office internet.

Someone should please tell me how to build the router with the Fedora Core!
Use SQUID (for web cache proxy or transparent web cache proxy) for internet access & use IPTABLES for security.

Squid how to for transparent proxy

& iptables tutorial
 
Old 11-30-2006, 05:40 PM   #12
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
I agree there jantman on the security issues. From the users request, the user just wanted to have eth1 to connect to the internet through eth0 at this time from what I interrupt.

Brian
 
  


Reply



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
CentoOS router/firewall prob - local network works but router can't access Internet elementalvoid Linux - Networking 6 12-12-2006 03:39 PM
Do I need to be on a network to use a router? habala Linux - Networking 6 01-26-2005 01:01 AM
Home network setup with network firewall/router Gates1026 Linux - Networking 4 01-17-2005 08:26 PM
Network speed problems on 15 user network to broadband wireless router AntWarrior Linux - Wireless Networking 2 12-02-2004 11:05 AM
Fwall/Router Network Appliance vs. stock mdk9 Fwall/Router box jqpdev Linux - Networking 2 02-28-2003 07:19 AM

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

All times are GMT -5. The time now is 12:51 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