Networking Forums

Networking Forums > Computer Networking > Linux Networking > forwarding traffic through a different interface?

Reply
Thread Tools Display Modes

forwarding traffic through a different interface?

 
 
mostro713@gmail.com
Guest
Posts: n/a

 
      10-06-2007, 08:39 PM
Hi All,

I setup and OpenVPN server that connects NETa (office network) with
NETb (firewall running OpenVPN). All computers on Netb are accessible
through the VPN.

When trying to connect to computers on Neta from Netb the private
packets attempt to go out the default gateway which is the external
public interface on NETb.

For example, pinging HOSTa from the firewall shows a source address of
the public address with the private ip destination.

I am using the SuSEfirewall script on 10.2.

How can I route all traffic destined for NETa (private network)
through the tun0 vpn connection?


Thanks in advance

 
Reply With Quote
 
 
 
 
Pascal Hambourg
Guest
Posts: n/a

 
      10-07-2007, 11:11 AM
Hello,

(E-Mail Removed) a écrit :
>
> How can I route all traffic destined for NETa (private network)
> through the tun0 vpn connection?


Check your routing tables and make sure you have the proper routes to NETa.
 
Reply With Quote
 
Antoine EMERIT
Guest
Posts: n/a

 
      10-07-2007, 08:19 PM
"(E-Mail Removed)" <(E-Mail Removed)> écrivait
news:(E-Mail Removed) ps.com:

> How can I route all traffic destined for NETa (private network)
> through the tun0 vpn connection?


Add a line in your OpenVPN server configuration file (server.conf) like
this :

push "route 192.168.10.0 255.255.255.0"

This add a route to the client when it connect (and remove it when it
disconnect).

You can add many "push route" in the same configuration.

Note: you must enable ip forwarding on the vpn server of course.
 
Reply With Quote
 
Unruh
Guest
Posts: n/a

 
      10-08-2007, 12:13 AM
"(E-Mail Removed)" <(E-Mail Removed)> writes:

>Hi All,


>I setup and OpenVPN server that connects NETa (office network) with
>NETb (firewall running OpenVPN). All computers on Netb are accessible
>through the VPN.


>When trying to connect to computers on Neta from Netb the private
>packets attempt to go out the default gateway which is the external
>public interface on NETb.


>For example, pinging HOSTa from the firewall shows a source address of
>the public address with the private ip destination.


That is a dns problem not a routing problem.


>I am using the SuSEfirewall script on 10.2.


>How can I route all traffic destined for NETa (private network)
>through the tun0 vpn connection?


There are two questions here. a) How can stuff be routed (It almost
certainly alreay is. Try doine
ping 10.8.0.1 or whatever a machine IP is on that remote network) and the
traffic will almost certainly pass down the tunnel.

HOwever if you say
ping donald.duck.com ( where donald.duch is the name of one of your remote
machines) it will first go out to the dns server and get the IP address,
and that will almost certainly be a public not private one, as you noticed.
Three solutions: Alsays use IP addresses not names
b) put the names and private IP addresses into /etc/hosts
c) Run a dns server and put in the names and private IPs of the remote
machines.




>Thanks in advance


 
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
count traffic on lan interface D.-Oliver Krusch Windows Networking 1 09-16-2007 10:18 PM
Traffic going through wrong interface Rodrigo A B Freire Linux Networking 8 08-09-2007 05:10 PM
Traffic going through single interface. Rodrigo A B Freire Linux Networking 4 06-09-2005 07:00 PM
interface traffic seperation Nic Windows Networking 2 07-08-2004 10:25 PM
setting an interface for up traffic and a second for down traffic eole Linux Networking 1 07-17-2003 05:31 PM



1 2 3 4 5 6 7 8 9 10 11