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 03-07-2006, 04:27 PM   #16
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

Then I would try the following.
eth0
IP 192.168.0.1
Subnet 255.255.0.0
Gateway 192.168.0.160
DNS IP ***.***.***.***

ra0
IP 172.16.0.1
Subnet 255.255.0.0
Gateway No Gateway defined

Brian1
 
Old 03-07-2006, 05:34 PM   #17
m4rk0
LQ Newbie
 
Registered: Jul 2005
Distribution: Debian, CentOS
Posts: 12

Original Poster
Rep: Reputation: 0
Hello everyone.

Now after cleaning iptables, routes and everything else, this setup working fine.

Code:
ifconfig eth0 192.168.0.1 netmask 255.255.0.0 up
ifconfig ra0 10.0.0.1 netmask 255.255.255.0 up

route add default gw 192.168.0.160

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

iptables -t nat -A POSTROUTING -s 10.0.0.0/24 -j MASQUERADE
 
Old 03-07-2006, 06:36 PM   #18
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
Glad to see you have it going there m4rk0

Brian1
 
Old 03-08-2006, 01:08 AM   #19
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Quote:
Originally Posted by m4rk0
Hello everyone.

Now after cleaning iptables, routes and everything else, this setup working fine.

Code:
ifconfig eth0 192.168.0.1 netmask 255.255.0.0 up
ifconfig ra0 10.0.0.1 netmask 255.255.255.0 up

route add default gw 192.168.0.160

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

iptables -t nat -A POSTROUTING -s 10.0.0.0/24 -j MASQUERADE
that works, but here's a couple changes i think you should make:
Code:
echo "1" > /proc/sys/net/ipv4/ip_forward
echo "1" > /proc/sys/net/ipv4/conf/all/rp_filter

iptables -F FORWARD
iptables -X FORWARD

iptables -F -t nat
iptables -X -t nat

iptables -P FORWARD DROP

iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT

iptables -A FORWARD -i ra0 -o eth0 -s 10.0.0.0/24 \
-m state --state NEW -j ACCEPT

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

Last edited by win32sux; 03-08-2006 at 01:09 AM.
 
  


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
Having problems routing between two interfaces... stakhous Linux - Networking 8 12-05-2004 06:10 PM
Routing between interfaces? cryptical Linux - Networking 13 08-18-2004 07:29 AM
Routing Between Virtual Interfaces on Web Server Louie55 Linux - Networking 2 02-20-2004 09:17 AM
Problem with routing between interfaces Kostko Linux - Networking 6 12-01-2003 01:47 PM
Setting of Interfaces and Routing Table swmok Linux - Networking 1 07-31-2003 06:44 AM

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

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