Networking Forums

Networking Forums > Computer Networking > Linux Networking > using iptables to route thru specific interface?

Reply
Thread Tools Display Modes

using iptables to route thru specific interface?

 
 
Tobias Skytte
Guest
Posts: n/a

 
      12-22-2003, 02:33 PM
Hi,

I have recently discovered that my ISP, who provides me with a vpn
tunnel for reception, is filtering out smtp, dns, telnet, ping and
other packets. Thus I can not telnet into my machine from the outside
even though I also have a DSL line to that server (that I use for
sending out thru).
This is set up on RH 7.1, using PPTP for the tunnel.
So what happens in a ping for example is this:
I ping from outside and it enters on eth0 which is the DSL connection.
The server sends a pong-reply but the reply is sent to the default
route which points to the VPN server thru ppp0.
The reply gets dropped in the VPN server.

So what I need is something that makes the reply packet bypass the
normal default route and go straight to the sender.
Someone told me I should be able to do this with iptables, but as I am
new to it I am not sure how.
Should I use DNAT? or mark the packages or what? I have read up on it
but am still confused.
Can this be done with ipchains?
I am sure someone has done the same before, maybe someone knows of a
good description on exactly what to do?

Best regards,
Tobias Skytte
 
Reply With Quote
 
 
 
 
Horst Knobloch
Guest
Posts: n/a

 
      12-22-2003, 05:40 PM
Tobias Skytte <(E-Mail Removed)> wrote:

> I have recently discovered that my ISP, who provides me with a vpn
> tunnel for reception, is filtering out smtp, dns, telnet, ping and
> other packets. Thus I can not telnet into my machine from the outside
> even though I also have a DSL line to that server (that I use for
> sending out thru).
> This is set up on RH 7.1, using PPTP for the tunnel.
> So what happens in a ping for example is this:
> I ping from outside and it enters on eth0 which is the DSL connection.
> The server sends a pong-reply but the reply is sent to the default
> route which points to the VPN server thru ppp0.
> The reply gets dropped in the VPN server.


I don't understand your network setup. It seems that you use
the DSL connection for incoming traffic and use the VPN
connection for outgoing traffic. This is a strange setup and
I can't think of any reason why you need to have such a setup.

Could it be that you have a VPN connection to acces only
certain sites from your ISP, and the DSL connection should
be used for all other traffic?

Or more probable, could it be that you should only use the
VPN interface for all the traffic and the Ethernet interface
is *only* used to transport the VPN traffic but nothing else.

What happens if you telnet or ping to the IP address of your
VPN interface (your local ppp0 address) instead of the Ethernet
address? Does this work?

May be a ifconfig and route -n would also help to understand
your network setup.

What protocols are you using on DSL, PPPoE, plain Ethernet
with DHCP to get the IP adress and other IP config. data?


Ciao, Horst
--
»When pings go wrong (It hurts me too)« E.Clapton/E.James/P.Tscharn
 
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to route through specific ip in Multiple IP on one NIC scenari Valdas Adomaitis Windows Networking 2 01-06-2010 09:13 PM
Having DCOM using a specific network route when multiple are avail Phil Windows Networking 1 11-23-2008 04:43 PM
Route traffic through specific interface on multi-homed server. jwilliams3034 Windows Networking 1 08-17-2007 06:44 PM
Adding a persistant route with a specific interface =?Utf-8?B?TVBpcnJvbmUx?= Windows Networking 3 04-07-2005 11:08 AM
Iptables NAT specific source IPs.. BWGames Linux Networking 2 03-16-2005 01:04 AM



1 2 3 4 5 6 7 8 9 10 11