nixCraft Linux Forum

nixCraft

Linux Tech Support Forum

Iptables/TC: how to make masqueraded traffic go through an openVPN tun0?

This is a discussion on Iptables/TC: how to make masqueraded traffic go through an openVPN tun0? within the Networking, Firewalls and Security forums, part of the Mastering Servers category; Hi all! We have a setup of three computers; Machine A (eth0) -> Machine B (eth0, hso0, tun0) -> Machine ...


Go Back   nixCraft Linux Forum > Mastering Servers > Networking, Firewalls and Security

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 04-23-2008, 07:07 PM
Junior Member
User
 
Join Date: Apr 2008
My distro: SUSE
Posts: 3
theVOID is on a distinguished road
Default Iptables/TC: how to make masqueraded traffic go through an openVPN tun0?

Hi all!

We have a setup of three computers;
Machine A (eth0) -> Machine B (eth0, hso0, tun0) -> Machine C (eth0, tun0)
hso0 is the packet interface of a 3G modem, it behaves like a normal network interface.
Machine B and C are connected in a VPN using openVPN (TCP). Machine A is a client that receives Network-configuration using DHCP from Machine B automatically.
Machine A eth0 : DHCP
Machine B eth0 : 192.168.2.1
Machine B hso0 : Static IP addr, Internet use
Machine B tun0 : 10.11.0.10 (openVPN client)
Machine C eth0 : Static IP addr, Internet use
Machine C tun0 : 10.11.0.1 (openVPN server)
OpenVPN (server) is configured to allow Internet-traffic to its clients. Code in server.conf:
# Make sure clients traverse tun0 when accessing Internet
push "redirect-gateway def1"
# Push a DNS server (handled by openVPN)
push "dhcp-option DNS 10.11.0.1"
We’re having issues to make Machine C release Internet traffic from Machine A. Note that we have setup masquerading on Machine B using iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE.
Currently Iptables on Machine B and Machine C have a policy of ACCEPT.
We have managed to make traffic from Machine A reach Machine C, but only with the internal IP of 192.168.2.48 (DHCP).
OpenVPN drops those packets (as it should!) because they come from 192.* and not 10.*
Is there a way to solve this? Thank you!
Reply With Quote
Reply

Bookmarks

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 On


Similar Threads

Thread Thread Starter Forum Replies Last Post
make 2.6.22 as 2.6.18 image.. sathiya Ubuntu / Debian 1 05-02-2008 02:03 AM
Monitoring traffic with debian raj Linux software 2 03-24-2008 07:37 PM
How to get MRTG of apache traffic manish_2479 Networking, Firewalls and Security 2 07-21-2007 02:15 AM
Restricting mail traffic bubloob_13 Linux software 1 01-09-2007 03:32 PM
make directory wk3000sg Shell scripting 2 08-18-2005 05:41 PM


All times are GMT +5.5. The time now is 04:07 PM.


Powered by vBulletin® Version 3.7.2 - Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35