Linux Advanced Routing and Traffic Control list
 help / color / mirror / Atom feed
From: VladSun <vladsun@relef.net>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] Newbie: Route some traffic through a pptp tunnel
Date: Thu, 17 May 2007 13:07:10 +0000	[thread overview]
Message-ID: <464C537E.4040800@relef.net> (raw)
In-Reply-To: <464C525A.2080307@crc.dk>

Mogens Kjaer написа:
> I have a centos 4 i386 machine that works like a
> router (iptables filter, NAT) with two NIC's.
>
> One NIC is connected to my ISP (100 Mbit FTTH),
> I get a DHCP assigned public IP that changes
> "sometimes". Most incoming ports are blocked
> by my ISP.
>
> In order to get a fixed IP and open ports, I
> have to set up a PPTP tunnel to the ISP.
>
> The default gw and the NAT'ing goes to this tunnel.
>
> This is the output of ifconfig:
>
> eth0 Link encap:Ethernet HWaddr 00:80:C8:EA:88:A7
> inet addr:86.48.47.147 Bcast:86.48.47.255 Mask:255.255.254.0
> inet6 addr: fe80::280:c8ff:feea:88a7/64 Scope:Link
> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> RX packets:8083596 errors:0 dropped:0 overruns:0 frame:0
> TX packets:3408048 errors:22 dropped:0 overruns:22 carrier:0
> collisions:0 txqueuelen:1000
> RX bytes:1538901914 (1.4 GiB) TX bytes:519514046 (495.4 MiB)
> Interrupt:169 Base address:0x4000
>
> eth1 Link encap:Ethernet HWaddr 00:12:79:A0:3D:7E
> inet addr:192.168.4.1 Bcast:192.168.4.255 Mask:255.255.255.0
> inet6 addr: fe80::212:79ff:fea0:3d7e/64 Scope:Link
> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> RX packets:126264 errors:0 dropped:0 overruns:0 frame:0
> TX packets:155536 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:1000
> RX bytes:23156937 (22.0 MiB) TX bytes:111015780 (105.8 MiB)
> Interrupt:177
>
> lo Link encap:Local Loopback
> inet addr:127.0.0.1 Mask:255.0.0.0
> inet6 addr: ::1/128 Scope:Host
> UP LOOPBACK RUNNING MTU:16436 Metric:1
> RX packets:912424 errors:0 dropped:0 overruns:0 frame:0
> TX packets:912424 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:0
> RX bytes:103397649 (98.6 MiB) TX bytes:103397649 (98.6 MiB)
>
> ppp0 Link encap:Point-to-Point Protocol
> inet addr:86.48.43.19 P-t-P:81.19.236.186 Mask:255.255.255.255
> UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1000 Metric:1
> RX packets:120948 errors:0 dropped:0 overruns:0 frame:0
> TX packets:109043 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:3
> RX bytes:80518167 (76.7 MiB) TX bytes:37434930 (35.7 MiB)
>
> This works today, my problem is that the tunneled traffic is slower than
> going through eth0 directly.
>
> How can I:
>
> 1. Use the tunnel for incoming and outgoing mail and incoming http 
> requests.
> 2. NAT traffic from eth1 to eth0, i.e. not through the tunnel
> 3. Local traffic from the router should access the internet through
> eth0, except for outgoing mails.
>
> Mogens
>
>
You may find the ROUTE iptables target useful for this.
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

      reply	other threads:[~2007-05-17 13:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-17 13:02 [LARTC] Newbie: Route some traffic through a pptp tunnel Mogens Kjaer
2007-05-17 13:07 ` VladSun [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=464C537E.4040800@relef.net \
    --to=vladsun@relef.net \
    --cc=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox