LinuxQuestions.org
Review your favorite Linux distribution.
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 10-12-2006, 05:49 PM   #1
Padawan.AVT
Member
 
Registered: Feb 2006
Distribution: Gentoo, Slackware, Debian, Suse
Posts: 86

Rep: Reputation: 15
Set up basic gateway


So here is my problem:

My PC has 2 NIC for 2 different subnetworks

eth0 for 172.16.0.0/24
eth1 for 192.168.0.0/24

Both interfaces are seen from their subnetworks

I've tried to set up routing by the following command:
iptables -t nat -A POSTROUTING -j MASQUERADE -o eth0

And ofcourse it didn't work. Please help me and also please tell me where I can read more about setting up simple router (gateway)?

Last edited by Padawan.AVT; 10-12-2006 at 05:50 PM.
 
Old 10-13-2006, 02:07 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Did you enable IP forwarding?
Code:
echo 1 > /proc/sys/net/ipv4/ip_forward
 
  


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
lm10.0 gateway is set but when I reboot I have to set the gateway rharvey32 Mandriva 8 02-13-2006 01:35 PM
set gateway paddy Ubuntu 3 02-13-2006 03:39 AM
Gateway set up xowl Slackware 1 02-04-2005 10:20 PM
How can I set Gateway? gubak Linux - Networking 29 07-20-2004 04:43 AM
trying to set up a gateway annehoog Linux - Newbie 6 05-12-2003 09:54 AM

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

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