Networking Forums

Networking Forums > Computer Networking > Linux Networking > help setup iptables router with two interfarces

Reply
Thread Tools Display Modes

help setup iptables router with two interfarces

 
 
jcharth@hotmail.com
Guest
Posts: n/a

 
      09-29-2005, 05:12 PM
I have to subnets 10.1.1.0/24 and 10.1.2.0/24, eth0 and eth1.

What do i need to set up the router?
is it

iptables -F

echo > /proc/sys/net/ipv4/ip_forward

enought?

thanks.

 
Reply With Quote
 
 
 
 
Duane Evenson
Guest
Posts: n/a

 
      09-30-2005, 08:50 AM
On Thu, 29 Sep 2005 10:12:45 -0700, jcharth wrote:

> I have to subnets 10.1.1.0/24 and 10.1.2.0/24, eth0 and eth1.
>
> What do i need to set up the router?
> is it
>
> iptables -F
>
> echo > /proc/sys/net/ipv4/ip_forward
>
> enought?
>
> thanks.

A little more information is needed. Is this a gateway to the internet,
say using eth2? If so then you need

iptables -t nat -A POSTROUTING -o eth2 -j MASQUERADE

also

echo 1 > /proc/sys/net/ipv4/ip_forward

You'll probably want to add the following line to /etc/sysctl.conf
net.ipv4.ip_forward = 1
So you don't have to enter the above echo command each time you restart
your system.

If this is just a bridge between two subnets, you probably don't need to
change your NAT table. I haven't set up a bridge myself, so I'll let
someone else talk you through this, but I expect you will only need to
adjust your routing table.


 
Reply With Quote
 
jcharth@hotmail.com
Guest
Posts: n/a

 
      09-30-2005, 02:45 PM
thanks got it to work editing the sysctl

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple symmetric NAT Setup using IPTABLES Asif Linux Networking 2 01-23-2006 12:15 PM
ssh host setup - iptables/ip_forwarding erniehannell@yahoo.ca Linux Networking 1 09-22-2005 01:16 PM
modem/router + wireless router setup problem Bob Bedford Wireless Networks 1 09-21-2005 02:11 AM
A home use BT Yahoo! Broadband connetion, is it possible to have my own wireless adsl router setup directly without any BT modem or router? John Hsu Home Networking 1 07-07-2004 09:39 PM
VPN setup behind iptables Soojin Kim Linux Networking 3 02-22-2004 10:31 AM



1 2 3 4 5 6 7 8 9 10 11