Routing in Linux


 
Thread Tools Search this Thread
Operating Systems Linux Routing in Linux
# 1  
Old 06-08-2007
Routing in Linux

Hello All,
I know it's a tricky probably stupid question but I'm stuck.... Smilie

Is there any way to route different protocols through different eth cards for the same destination in Linux? With route add or something like it?

For instance:
FTP to/from 192.168.1.1 goes through eth0 - gw2
telnet to/from 192.168.1.1 goes through eth1 - gw3

The problem is that I've a route to 192.168.1.1 through gw2 and iptables that allow this, FTP only in/out the eth0. But for telnet I want to go through gw3...

It's not a problem with the iptables, since I disabled and I got the same problem.
The telnet packet goes to eth1 but the server doesn't answers to the same eth since the destination of the telnet packet it's in the network from et1.

Any idea?

Thanks in advanced
# 2  
Old 06-11-2007
hi pmpx,

you need more than routing since you are targeting an application layer.
for the simplicity -- you can use iptables to drop incoming FTP on eth1, and telnet on eth0 - that will force the system to route FTP to your eth0, and vice versa. the remote end will reply back exactly to them - unless there is a PBR also.

or you can use iptables redirection.

quote :
"The telnet packet goes to eth1 but the server doesn't answers to the same eth since the destination of the telnet packet it's in the network from et1."

that will not likely. probably the remote end doesnt permit telnet.


HTH,
Cheers.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. IP Networking

Implement inter vlan routing with Linux

Hello. I want to Communicate 2 VLAN with router like this solution: http://8pic.ir/images/83m0ouih8mmm9s1sfl56.jpg For this purpose I'm configuring 2 Linux system as a switch and connect 4 host to them. Then a router is added to scenario. The configuration of the switches is: On DUT1(Linux):... (1 Reply)
Discussion started by: zsn
1 Replies

2. IP Networking

Linux bridge routing failing on Proxmox3.2/Debian7.0

I am having problems configuring bridged networking on Proxmox3.2/Debian7.0 I have 2 bridges - vmbr0 and vmbr1. I want to attach a gateway/firewall running in a virtual machine between the 2 and use it to connect out to the WAN through vmbr0. I have removed the IP, mask and gateway from... (0 Replies)
Discussion started by: OSSVirt
0 Replies

3. UNIX for Dummies Questions & Answers

Linux - how to turn on the the RIP (dynamic routing)

(3 Replies)
Discussion started by: samnyc
3 Replies

4. Linux

Routing

Hello Friends I have two network cards eth0 192.168.100.1 eth1 10.0.0.1 There NIC connect with diff. LAN I want to make my Linux machine as a Router, Please tell me using IPTABLES command ROUTE command :) (2 Replies)
Discussion started by: jaibw
2 Replies

5. Linux

linux routing

how i add new routes to my linux machine (1 Reply)
Discussion started by: youmna
1 Replies

6. Red Hat

Linux Routing Help

I have just recently got into using Linux RedHat 9. So far I love it, I have set it up on a server I am running. Right now I have set up Samba and am running a file server for my house. I have four computers, the linux box is connected to the internet through a switch I have. There are two NICS in... (1 Reply)
Discussion started by: xTHESEUSx
1 Replies

7. Red Hat

Setting Up Routing In Linux Redhat 9 Help

:mad: I have just recently got into using Linux RedHat 9. So far I love it, I have set it up on a server I am running. Right now I have set up Samba and am running a file server for my house. I have four computers, the linux box is connected to the internet through a switch I have. There are two... (5 Replies)
Discussion started by: xTHESEUSx
5 Replies

8. Linux

NAT Routing in linux

How to use NAT Router in linux Redhat 6 ? and what packages and configuration are required ? (1 Reply)
Discussion started by: salhoub
1 Replies

9. IP Networking

Routing

ok i configured my gateway and IP address(es) using ifconfig and route.. but how can i bind unique IPs to users ? (im using FreeBSD 4.2 RELEASE #3) (9 Replies)
Discussion started by: DevilGREEN
9 Replies

10. IP Networking

Routing

I have SCO Unix. I have 2 routers. as it is now, when someone telnets to UNIX and goes through router #1 everything is fine. The users who go through router #2 can not connect at all. I talked to CISCO and they said I need to set up a second Gateway on UNIX. They said what is happening is that... (1 Reply)
Discussion started by: john fli
1 Replies
Login or Register to Ask a Question