LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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 09-06-2004, 08:35 AM   #1
netguy2000
Member
 
Registered: Oct 2003
Location: Karachi, PAKISTAN
Distribution: Redhat, Fedora, Open BSD, FreeBSD, SlackWare
Posts: 109

Rep: Reputation: 15
Question For Linux GURU's: route configuration in complex network


Dear All,
I am in big trouble and tried since from 2 weeks, but unsucsesfull PLEASE HELP ME.

I configure a Linux (mandrake 10 ) router with 4 NICs.

eth0 = 192.168.0.1 (attached with my Local LAN)
eth1 = 192.168.7.1 (attached with Internet DSL for internet browsing)
eth1:0 = 192.168.7.2 (attachec with DSL for my e-mail server by NAT)
eth2 = 192.168.3.1 (attached with my second LAN )
eth3 = 192.168.6.1 (attached with my second DSL Link for internet access)

my route command shows.
[root@router root]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.6.0 * 255.255.255.0 U 0 0 0 eth3
192.168.3.0 * 255.255.255.0 U 0 0 0 eth2
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
192.168.7.0 * 255.255.255.0 U 0 0 0 eth1
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default 192.168.6.2 0.0.0.0 UG 0 0 0 eth3
[root@router root]#

now I want to NAT my e-mail server traffice from IP 192.168.7.2 to my Local LAN PC IP 192.168.0.5,HOW CAN I DO THIS PLEASSSSSSSS HELP ME
If I change default route then internet not work. and I dont know how my e-mail server send traffic on 192.168.7.0 network.

Help me soon Its already tooooooooo LATE.
Thanks in advance
 
Old 09-06-2004, 09:00 AM   #2
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,990

Rep: Reputation: 67
Look at the /etc/services file. It lists the port numbers for all the various “standard” protocols.
SMTP is outgoing email (pushing to a mailbox from a client).
POP3 is incoming email (i.e. fetching email from a mailbox to a client).
IMAP is also incoming email (i.e. fetching email from a mailbox to a client). Most setups use only one of IMAP or POP3.

You need to redirect these ports only to do what you're asking.

But there may be other ways. Can you set up 192.168.0.5 to use the Linux router as a gateway? Then it could just connect directly to 192.168.7.2 to fetch or send email, and the gateway should take care of it by the non-default route (the default route is only ever used as a fallback).

You could also look at port forwarding and tunneling programs. Personally, I use stunnel on my computer to tunnel and secure the POP3 socket on my local machine to the POP3S socket on my mail server. The mail client then fetches my email from the local machine — at which point, neither the email client nor NAT cares about the fact that the email actually comes from a different computer.

Hope that helps,

— Robert J. Lee
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Windows route configuration easier than Linux??? hdalle Linux - Networking 5 08-25-2004 06:14 AM
Route to subnet exists but I get "Network unreachable" when adding default route fciuffani Linux - Networking 4 08-18-2004 02:11 PM
need help from Linux guru's please lvieira Linux - General 2 06-15-2004 10:02 AM
Internal Firewall/Gateway problems on complex home network WarmFlatSprite Linux - Wireless Networking 3 02-19-2004 08:33 PM
Complex home network xblade2003 Linux - Networking 3 07-08-2003 11:16 AM


All times are GMT -5. The time now is 12:32 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration