All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wingtung.Leung s965817@uia.ua.ac.be
To: lartc@vger.kernel.org
Subject: [LARTC] partly correct routing
Date: Mon, 04 Dec 2000 19:05:05 +0000	[thread overview]
Message-ID: <marc-lartc-98373938216994@msgid-missing> (raw)
In-Reply-To: <marc-lartc-98373938216993@msgid-missing>

<PRE>I think you misunderstand the FTP protocol. The FTP commands are sent to
the server's port 21 and the data is sent FROM the server port 20 to a
local unprivileged port (&gt;1024).

I think you should set your mark dependant on source port instead of
destination port.

Another way: use passive FTP, where the client initiates the connection to
a unprivileged server port.

(I know I don't give all the answers here, but hope it's a good start for
you.

On Mon, 4 Dec 2000, Stefan Bayer wrote:

&gt;<i> Hello!
</I>&gt;<i> I want to use my isdn (ippp0) connection for ftp transfer and my adsl
</I>&gt;<i> (eth0/ppp0) connection for all other transfer from my LAN (eth1) connected to
</I>&gt;<i> the router.
</I>&gt;<i> I managed to set up iproute2 with fwmarks to send out packet to ippp0, but
</I>&gt;<i> the data connection is done by adsl.
</I>&gt;<i> What do I have to set up to get this working correctly?
</I>&gt;<i> my iptables setup:
</I>&gt;<i> $IPTABLES -A PREROUTING -t mangle -p TCP -d ! $LOCALNET --dport 21 -j MARK
</I>&gt;<i> --set-mark 1
</I>&gt;<i> $IPTABLES -A PREROUTING -t mangle -p UDP -d ! $LOCALNET --dport 21 -j MARK
</I>&gt;<i> --set-mark 1
</I>&gt;<i> $IPTABLES -A PREROUTING -t mangle -p TCP -d ! $LOCALNET --dport 20 -j MARK
</I>&gt;<i> --set-mark 1
</I>&gt;<i> $IPTABLES -A PREROUTING -t mangle -p UDP -d ! $LOCALNET --dport 20 -j MARK
</I>&gt;<i> --set-mark 1
</I>&gt;<i>
</I>&gt;<i> routing in table ippp0:
</I>&gt;<i> ip route list table ippp0
</I>&gt;<i> 195.3.65.72 dev ippp0  proto kernel  scope link  src 212.183.78.79
</I>&gt;<i> default via 195.3.65.72 dev ippp0
</I>&gt;<i>
</I>&gt;<i> other routing:
</I>&gt;<i> ip route list
</I>&gt;<i> 212.88.181.5 dev ppp0  proto kernel  scope link  src 212.88.xxx.xxx
</I>&gt;<i> 195.3.65.0/24 dev ippp0  proto kernel  scope link  src 212.183.78.79
</I>&gt;<i> 10.0.0.0/24 dev eth0  proto kernel  scope link  src 10.0.0.2
</I>&gt;<i> 192.168.2.0/24 dev eth1  proto kernel  scope link  src 192.168.2.1
</I>&gt;<i> 127.0.0.0/8 dev lo  scope link
</I>&gt;<i> default via 212.88.181.5 dev ppp0
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> ip rule list
</I>&gt;<i> 0:      from all lookup local
</I>&gt;<i> 32765:  from all fwmark        1 lookup ippp0
</I>&gt;<i> 32766:  from all lookup main
</I>&gt;<i> 32767:  from all lookup default
</I>


</PRE>

      reply	other threads:[~2000-12-04 19:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-12-04 17:17 [LARTC] partly correct routing Stefan
2000-12-04 19:05 ` Wingtung.Leung [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=marc-lartc-98373938216994@msgid-missing \
    --to=lartc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.