LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-06-2010, 02:31 AM   #1
fdelval
Member
 
Registered: Feb 2010
Posts: 107

Rep: Reputation: 15
turning ubuntu/linux into a router


Hello all

i would like to know whats the minimal iptables config for turning my ubuntu box into a router


i just tryed this one and works:

echo "1" > /proc/sys/ipv4/ip_forwarding
and
sudo iptables -A POSTROUTING -t nat -j MASQUERADE
(default policies are ACCEPT)


Ok, now im wondering if i can remove that NAT policy, or if that is absolutely necessary

if so, what is the minimal rules i must set up in order to route¿
 
Old 08-06-2010, 05:44 AM   #2
sem007
Member
 
Registered: Nov 2006
Distribution: RHEL, CentOS, Debian Lenny, Ubuntu
Posts: 638

Rep: Reputation: 113Reputation: 113
What is your exact requirement to create linux router?

BTW below links give you idea.

https://help.ubuntu.com/community/In...nectionSharing

http://ubuntulinuxhowto.blogspot.com...be-router.html
 
Old 08-06-2010, 06:15 AM   #3
fdelval
Member
 
Registered: Feb 2010
Posts: 107

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by sem007 View Post
What is your exact requirement to create linux router?

BTW below links give you idea.

https://help.ubuntu.com/community/In...nectionSharing

http://ubuntulinuxhowto.blogspot.com...be-router.html


Hello sem007,
Well, i have deployed a handfull of firewall/routers, but always with a fixed config. It worked ok with a proxy, dhcpserver etc etc, but i have never understood WHY or HOW it worked.
With the last server i have started, i want to LEARN what am i doing, and thats why i want to know exactly which commands to what thing.
All manuals are "complete" but i want to try "incomplete" configs, and thats why im here, asking why i need that, and what i dont need...
 
Old 08-06-2010, 06:41 AM   #4
sem007
Member
 
Registered: Nov 2006
Distribution: RHEL, CentOS, Debian Lenny, Ubuntu
Posts: 638

Rep: Reputation: 113Reputation: 113
Quote:
Originally Posted by fdelval View Post
Hello sem007,
Well, i have deployed a handfull of firewall/routers, but always with a fixed config. It worked ok with a proxy, dhcpserver etc etc, but i have never understood WHY or HOW it worked.
With the last server i have started, i want to LEARN what am i doing, and thats why i want to know exactly which commands to what thing.
All manuals are "complete" but i want to try "incomplete" configs, and thats why im here, asking why i need that, and what i dont need...
ok... i advise you to spend some time to read,learn and test iptables rules. look below link that will help to understand iptables rules. There is some tutorials links also available.

Iptables

HTH

Last edited by sem007; 08-06-2010 at 06:42 AM. Reason: provide link
 
  


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
Does rebooting and turning off and then on the router and DSL modem... M$ISBS Linux - Networking 2 07-15-2006 10:22 PM
Turning my Linux Router into a wireless router Nickj Linux - Wireless Networking 2 07-12-2006 08:31 PM
Turning a PC into a router Drizzet Linux - Newbie 2 06-03-2006 08:38 PM
Is turning off router and modem more secure? M$ISBS Linux - Security 1 11-29-2005 12:00 AM
network card needs to be restarted after turning router off and on JacekZ Linux - Networking 2 09-06-2005 05:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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