[SOLVED] How to forward lan traffic from router to openvpn client....

Hi all,
I have maybe a strange situation. I recently started testing a VPN service on my home network. Ideally I would like most of my home machines to connect through this VPN. I am using it for both privacy and to circumvent geo-restricted sites. I have a router, Asus WL-500gp which is running the Tomato Firmware, and I did first attempt to setup OpenVPN on it which did work but didn't provide very much bandwidth due to probably not having enough processing power to deal with the encryption and the compression involved. I was only able to get about 5Mbit down when normally I get approx 30+ so this was not an acceptable performance hit.
I then decided to try setting up the VPN on my media server which is running Arch(of course). This was easily accomplished and is working extremely well with approx 25Mbs down. An acceptable performance hit. Now, as it stands only this machine is running through the VPN, the rest of the machines are still connecting to the net normally through the router. Is there a way to have other devices on my lan also get forwarded through the VPN on my Arch server. I do realize I could run my server as a router but I would rather leave the tomato router for that as it works well and is easy to setup whereas I suspect it may be complicated to setup on Arch. Is it possible to configure the tomato to forward certain IP's(my wired network is all static ip's) or even MAC's to the media server rather than the ISP. I suspect it can be done with some new routes added in but I am not that familiar with routing tables to figure it out.
So for example my tomato router is on ip 192.168.1.1, media server is on 192.168.1.2, xbmc 1 is on 192.168.1.3, xbmc 2 is on 192.168.1.4 etc. So say I would also like to have xbmc 1 and 2 go through the VPN as well. Is there a relatively simple way to accomplish this? I am thinking something along the lines of having the tomato forward request from IP 192.168.1.3-192.168.1.4 to 192.168.1.2(rather than the default gateway), then on the server tell it to forward these request to tun0(the VPN's network device).
Any thoughts? Anyone done something like this?
Thanks,
Kevin
Last edited by ould (2012-12-26 13:29:59)

Xyne wrote:
My first thought was to just set the server up as a router, but then I got to the part where you reject the idea. If you change your mind, you may find my recent notes on configuring something similar useful.
I'm pretty much a networking noob so I may be way off, but I would try the following. Here I'm assuming that the lan and vpn interfaces on the server are eth0 and tun0, respectively. These commands are adapted from the aforementioned notes.
On the server:
# Enable IP forwarding.
echo 1 > /proc/sys/net/ipv4/ip_forward
# Allow postrouting to tun0. You may want to use "-s" here to strictly limit forwarding to IPs on your LAN.
iptables -t nat -A POSTROUTING -o tun0 -j MASQUERADE
# Enable forwarding from the LAN to the VPN (and back via related and established connections).
# Again, you may want to use "-s".
iptables -A FORWARD -i eth0 -o tun0 -j ACCEPT
iptables -A FORWARD -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
After that, I think  you can you just need to set the server as the default gateway on the other machines. I am not familiar with the Tomato firmware, but I would expect there to be some easy way to do it there.
You probably want the router to return the VPN's DNS servers instead of your ISP's DNS servers if you use DHCP on the LAN.
Thank you very mach! It's has been useful for me when i wanna connect my VBox mashines to do my lab)

Similar Messages

  • How can we forward XML document from Routing Engine to Mapviwer!!!

    Does anyone try to forward XML document from routing engine to Mapviwer. Like spatial coordinate system from Routing engine. Could you help me how to accomplish this problem. Thank much much....

    Just open an HTTP connection to MapViewer's server url (ususally http://host:port/mapviewer/omserver) and send an XML map request to it using POST. You can do that from any language that supports such a connection.
    Inside the xml map request you can attach the routing result (a series of coordinates i imagine) as dynamic geo-features. You can also specify any base map/layer information in the xml map req provided you have defined such map/themes. DTD of mapviewer's map req is in the Users Guide, which is on OTN site mapviewer http://otn.oracle.com/products/mapviewer.

  • How to forward the traffic of my router??

    Good evening
    I have a problem, I hope someone can help me.
    I have to forward the traffic of my Cisco Router 877W (ip:10.10.10.1) into a hardware firewall (ip: 10.10.10.50) and I can't do it.
    Could you give me some advice??
    Thanks for your attention.

    Hi Marco,
    ip route 0.0.0.0 0.0.0.0 10.10.10.50
    !-- Static default route pointing to the Firewall.
    http://www.cisco.com/warp/public/105/36.html
    Regards,
    ~JG
    Please rate helpful posts

  • How to redirect Internet traffic from RV082 to RV042 through a VPN Tunnel??

    Fellows,
    We have offices in USA and Venezuela.
    In our USA office we have a RV042 router and in Venezuela we have a RV082 router.
    We have connected a VPN tunnel (gateway-to-gateway) between both offices.
    The point is:
    How   could we redirect the internet traffic from our Venezuela office   (RV082) to the USA Office (RV042) to navigate using USA public IP's?
    The   reason for this is that we need to use online streaming services which   are only available for IP's from USA and we can't use them from the   Venezuelan IP's.
    We  can not use the PPTP option since the  equipment which will use the  streaming services (like hulu, crackle,  etc.) in Venezuela is a Google  TV device which doesn't allow the  configuration of proxy navegation or  PPTP VPN connections itself. That's  the reason why we need to do that  through the routers.
    We will really appreciate your support on this matter.
    Daniel

    Hi Daniel, this is called ESP wildcard forwarding which the router does support.
    https://supportforums.cisco.com/docs/DOC-12534   <- This is older but applicable
    https://supportforums.cisco.com/message/3766661
    -Tom
    Please mark answered for helpful posts

  • Example how to forwards an email from OCS via API ?

    is there a working example available, how to forward an email with known msg_id from a user's inbox ?

    This has something to do with Java? In html, create a mailto: url.

  • [SOLVED] How Can I Stop DHCPCD from Overwriting my /etc/resolv.conf...

    Hey guys,
    For some unknown reason /etc/dhcpcd.conf continually overwrites my /etc/resolv.conf file, eventhough I set the "nohook resolv.conf" hook in /etc/dhcpcd.conf.
    This is screwing up my DNS and intermittently creating connection problems. Any of you guys know why the hook is not taking effect or how I can stop dhcpcd from overwritting this file?
    Thanks
    Last edited by w201 (2013-03-18 19:05:15)

    drcouzelis wrote:
    w201 wrote:I set the "nohook resolv.conf" hook in /etc/dhcpcd.conf.
    kaszak696 wrote:
    dhcpcd's configuration file may be edited to prevent the dhcpcd daemon from overwriting /etc/resolv.conf. To do this, add the following to the last section of /etc/dhcpcd.conf:
    nohook resolv.conf
    I don't think that information will help w201...
    I changed my DNS to the Google one (8.8.8.8 or something). That's in "resolv.conf", isn't it? I remember editing some OTHER configuration file, which is then read to create the "resolve.conf" file. There it is, in that link to the wiki, under "Use resolv.conf.head". Does that help you do what you want to do?
    There's three techniques at the wiki link, the nohook one, the resolv.conf.head one and the write-protection attribute. 

  • How to download a file from Application Sever to Client Workstation?

    Hi All,
    I know how to move a file from client workstation to Application server.
    How to download that uploaded file from Application file (AL11)  directory to local desktop?
    Regards,
    Arun.M.D

    Hi Arun,
    Goto AL11 - > click on the directory path and select your file  -open the file - > click on menu item List - >save/send -> file
    -> select the type of file.
    Or you can write a small abap code using DATASETS. If you require I will post the code.
    Hope it helps you.
    Regards,
    Rajani.

  • HOW TO COPY A FORM FROM ONE TO ANOTHER CLIENT

    HOW TO COPY A FORM FROM ONE TO ANOTHER CLIENT

    Hi Tina,
    To copy either a Script or a Smartform fron one client to another client i.e from reference client 000 to any client say 010  follow instructions as given below:
    Go to Tcode SE71->Give Form name MEDRUCK then go to Menu path Utilities->Copy From Client, give
    Form Name: MEDRUCK
    SOURCE:000 (it will be already there)
    Target Form: Zmedruck(here give ur form zname)
    Execute
    It will be copied into all languages.
    Then come back to SE71
    Give your form name Zmedruck
    Language:: de then goto change mode
    then menu path->utilities->convert original languge to En and enter you will get a message original language of form zmedruck converted from de to en,
    now  change language de to en in se71 main screen and then do what ever changes you want to do , this is how you can copy a script or smartform from one client to another client.
    If this answer is useful reward points any queries revert me back.

  • Monitoring network traffic from large queries to client

    Hi, is there any way to monitor the volume from network traffic from the server to the client, the statistics SQL*net message to client and SQL*net message from client don't show a full picture.
    I have a query that sends several GB of data to a client but the SQL*net statistics done show anything like this, is there any way I can see the volume of traffic from the RDBMS statistics?
    Regards.

    Alan Wilson wrote:
    Hi, is there any way to monitor the volume from network traffic from the server to the client, the statistics SQL*net message to client and SQL*net message from client don't show a full picture.
    I have a query that sends several GB of data to a client but the SQL*net statistics done show anything like this, is there any way I can see the volume of traffic from the RDBMS statistics?
    Sounds like you're looking at the Wait events only - you need to check the instance (or session) activity - v$sysstat/v$sesstat for the following stats:
    NAME
    bytes sent via SQL*Net to client
    bytes received via SQL*Net from client
    SQL*Net roundtrips to/from clientIt's worth pointing out, by the way, that SQL*Net can do "compression" on the fly by comparing columns across rows of data sent, so the volumes you see in these stats may not match the volume you finally see arriing in the client code. ( http://jonathanlewis.wordpress.com/2010/05/07/sqlnet-compression/ )
    If you need to optimise the transfer rate, look at the SQL*Net configuration (at both ends) for the Session Data Unit (SDU) and the o/s transmit and receive buffers.
    Regards
    Jonathan Lewis

  • How access Office LAN via Cisco Router & Switches HELP!!

    Hello everyone!
    For starters I am no Cisco guru but at least find my way around a few things here and there.
    I work as the IT dude for a company with two branches at different geolocations.
    Our local network infrastructure at both HQ and branch offices comprise a Cisco 1941 Router and SF 300 24P Managed switches which hooks up our servers, workstations and VoIP phones.
    The dedicated internet [DI] is connected via a Hughes radio link which belongs to the telco and on a different IP class and connects to interface 0/0 of Cisco 1941. Interface 0/1 is then connected to one of the SF 300 24P managed switches on another IP class for LAN  [192.168.1/24]
    I have three questions.
    1. How do I access for example the File Server on the Corporate LAN from home?
    2. How do I get workstations at branch offices authenticate with Active Directory Server at the HQ?
    3. How do I get to get VoIP phones in branch offices hooked up to HQ VoIP PBX?
    Thank you very much.

    Hello everyone!
    For starters I am no Cisco guru but at least find my way around a few things here and there.
    I work as the IT dude for a company with two branches at different geolocations.
    Our local network infrastructure at both HQ and branch offices comprise a Cisco 1941 Router and SF 300 24P Managed switches which hooks up our servers, workstations and VoIP phones.
    The dedicated internet [DI] is connected via a Hughes radio link which belongs to the telco and on a different IP class and connects to interface 0/0 of Cisco 1941. Interface 0/1 is then connected to one of the SF 300 24P managed switches on another IP class for LAN  [192.168.1/24]
    I have three questions.
    1. How do I access for example the File Server on the Corporate LAN from home?
    2. How do I get workstations at branch offices authenticate with Active Directory Server at the HQ?
    3. How do I get to get VoIP phones in branch offices hooked up to HQ VoIP PBX?
    Thank you very much.

  • How to forward a page from multiple frames

    hi,,
    in my first jsp page there are 4 frames header ,footer,one left frame and right frame
    in my header log out is there if im clicking logout it should forward to login page.it is happening but that page is coming within that header part(frame).how to make it visible as a full screen
    my first page containing frames is as follows
    <html>
    <frameset rows="15%,*" ,id="app_frame" borderColor="red" frameBorder="0" frameSpacing="0">
    <frame src="frame1.jsp" id="bar_top_frame" name="top_frame" marginWidth="0" marginHeight="0" scrolling="no"/>
    <frameset rows="89%,*",border="0" framespacing="1" frameborder="no" borderColor="red">
    <frameset cols="20%,75%",id="app_frame2" borderColor="#33CCFF" frameBorder="yes" frameSpacing="0" >
    <frame src="bar_left.jsp"id="bar_left_frame" name="bar_left_frame" marginWidth="0" borderColor="red" marginHeight="0" scrolling="no" />
    <frame src="frame3.jsp" id="work_frame" name="work_frame" marginWidth="0" borderColor="red" marginHeight="0" framespacing="1" />
    </frameset>
    <frameset rows="100%,*",border="0" framespacing="0" frameborder="0" borderColor="#0">
    <frame src="footer.jsp" name="footer" NORESIZE frameborder="0" scrolling="no"/>
    </frameset>
    </frameset>
    </frameset>
    </html>
    and my header frame that is frame1 is as follows
    <html>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>ALMAT_ROLE_MAINTAINENCE</title>
    <link href="<%=request.getContextPath()%>/almat/css/default.css" rel="stylesheet" type="text/css" />
    <body>
    <div id="header">
         <div id="topmenu">
              <ul>
                   <li>Home</li>
                   <li>Contact</li>
                   <li>Sitemap</li>
    <li><a href="<%=request.getContextPath()%>/almat/pages/jsp/firstPage.jsp accesskey="3" title="">Log Out</a></li>
              </ul>
         </div>
         <div id="logo">
              <h1>A L M A T</h1>
              <h2>..Allocation Made Easy</h2>
         </div>
    </div>
    </body>
    </html>
    pls help me out to solve this

    Simple answer is don't use Frames, Sorry I know you already have a design but plz! With JSP include there is no reason to use Frames also with the use of AJAX there is defo no need to use Frames.
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
    <div id="app_frame">
         <jsp:include page="/frame1.jsp" />
    </div>
    <div id="bar_left_frame">
         <jsp:include page="/bar_left.jsp" />
    </div>
    <div id="work_frame">
         <jsp:include page="/frame3.jsp" />
    </div>
    <div>
         <jsp:include page="/footer.jsp" />
    </div>PS, try using Javascript
    <script>
    document.location="/url"
    </script>Edited by: Gizard on Apr 17, 2009 6:54 AM

  • How to use LAN internet from PC in N79 ?

    Hi there.. As question states, I want to use PC internet in N79. I have a 2Mbps ADSL broadband connection through LAN in my PC. I want to use that in my N79. I know it is possible other way round using PC Suite. Can I access PC internet in my N79 ? If yes, please tell how. What are the settings ?

    I too have a N-79 mobile. when i connect to a wireless network i was asked a WEP key. I gave the key and got connected. when i surf through the browser i get this error "Gate-way Error". How do i solve this problem. kindly help me out. I have a Lenovo laptop with wi-fi facility. and 2Mbps BSNL broadband.
    Message Edited by samresh22 on 23-Dec-2009 05:51 AM

  • [SOLVED] How to Restore Folders/Files from a Hard Drive

    I broke my system today; it won't boot into any run level. Rather than try to fix it, I'd like to just pull off the 4 or 5 MB of files that are on the hard drive. The partition they are in was formatted XFS. I have the 2008.06 ArchLive CD - is it possible to access files from the hard drive after booting with an ArchLive CD? If so, I could just scp them to an external server. Any help is greatly appreciated. Thanks.
    Last edited by tony5429 (2008-09-28 04:52:39)

    You should be able to mount the partition once you've loaded up the live CD. Just figure out which one it is by using
    fdisk -l
    then mount it to /mnt or wherever you want it.
    As for moving/saving them, I'm not entirely sure how to get them onto an external server. You might have to mount another partition in order to install any apps that you need to connect to an external server, but wait for someone who really knows to answer before you try it. If you're only talking about 4 or 5 MB, I would just mount a USB stick and dump them on there.
    Last edited by Xyne (2008-09-28 03:38:02)

  • [Solved] how to patch source file from AUR for gcc46 ?

    In a topic from yesterday, I was seeking help to get AUR package 'insight' installed, but so far no luck, since there seems to be a bug in the source that won't work with the gcc47 compiler.  I'm posting this new topic, since the subject has changed a bit - I'm now trying to compile gcc46 because another user had success with that version in compiling the 'insight' package, and I need to patch the gcc46 source to get it to compile.
    I'm looking for help to fix the problem myself, or if anyone wants to create a new PKGBUILD to handle the problem, that would be nice too
    Originally, I thought I would try to install gcc42 from AUR and use that to run makepkg on the 'insight' app, since one user had success with this version of gcc.  Both gcc42 and gcc46 give me the same errors with an 'unwind' file, and I couldn't get either to compile (errors about unwind.h or linux-unwind.h).
    I found a post with a link to a patch (for gcc46), but I have no idea where to apply or how to apply this patch.  I think I'm supposed to apply it to this file, but again, I'm not sure how to apply a patch:
    /home/briphi/builds/gcc46/src/gcc-4.6.3/gcc/unwind-dw2.c
    , but this c file has includes to other "unwind" header files.  Here is a link to the unwind-dw2.c file at my dropbox folder, if anyone needs to see this file without downloading/compiling gcc46: http://dl.dropbox.com/u/8169867/unwind-dw2.c
    Sticking with gcc46 for the moment (since I found the patch for this version)...
    The post with the link to the patch to gcc46 is here: https://bbs.archlinux.org/viewtopic.php … 0#p1229880
    The patch at pastebin.com is here: http://pastebin.com/VkgE27Pd and looks like this:
    --- a/gcc/config/i386/linux-unwind.h 2011-01-03 20:52:22.000000000 +0000
    +++ b/gcc/config/i386/linux-unwind.h 2012-07-06 12:23:51.562859470 +0100
    @@ -133,9 +133,9 @@
    struct rt_sigframe {
    int sig;
    - struct siginfo *pinfo;
    + siginfo_t *pinfo;
    void *puc;
    - struct siginfo info;
    + siginfo_t info;
    struct ucontext uc;
    } *rt_ = context->cfa;
    /* The void * cast is necessary to avoid an aliasing warning.
    The package that I'm actually trying to install is 'insight', here: https://aur.archlinux.org/packages/insight/
    My error when compiling (running makepkg -s on gcc46) looks like this:
    /home/briphi/builds/gcc46/src/gcc-build/./gcc/xgcc -B/home/briphi/builds/gcc46/src/gcc-build/./gcc/ -B/usr/i686-pc-linux-gnu/bin/ -B/usr/i686-pc-linux-gnu/lib/ -isystem /usr/i686-pc-linux-gnu/include -isystem /usr/i686-pc-linux-gnu/sys-include -g -march=i686 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -O2 -g -march=i686 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -fno-stack-protector -I. -I. -I../.././gcc -I/home/briphi/builds/gcc46/src/gcc-4.6.3/libgcc -I/home/briphi/builds/gcc46/src/gcc-4.6.3/libgcc/. -I/home/briphi/builds/gcc46/src/gcc-4.6.3/libgcc/../gcc -I/home/briphi/builds/gcc46/src/gcc-4.6.3/libgcc/../include -I/home/briphi/builds/gcc46/src/gcc-4.6.3/libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS -DUSE_TLS -o unwind-dw2.o -MT unwind-dw2.o -MD -MP -MF unwind-dw2.dep -fexceptions -c /home/briphi/builds/gcc46/src/gcc-4.6.3/libgcc/../gcc/unwind-dw2.c -fvisibility=hidden -DHIDE_EXPORTS
    In file included from /home/briphi/builds/gcc46/src/gcc-4.6.3/libgcc/../gcc/unwind-dw2.c:333:0:
    /home/briphi/builds/gcc46/src/gcc-4.6.3/libgcc/../gcc/config/i386/linux-unwind.h: In function ‘x86_fallback_frame_state’:
    /home/briphi/builds/gcc46/src/gcc-4.6.3/libgcc/../gcc/config/i386/linux-unwind.h:138:17: error: field ‘info’ has incomplete type
    make[3]: *** [unwind-dw2.o] Error 1
    make[3]: Leaving directory `/home/briphi/builds/gcc46/src/gcc-build/i686-pc-linux-gnu/libgcc'
    make[2]: *** [all-stage1-target-libgcc] Error 2
    make[2]: Leaving directory `/home/briphi/builds/gcc46/src/gcc-build'
    make[1]: *** [stage1-bubble] Error 2
    make[1]: Leaving directory `/home/briphi/builds/gcc46/src/gcc-build'
    make: *** [all] Error 2
    ==> ERROR: A failure occurred in build().
    Aborting...
    Last edited by stringchopper (2013-02-15 08:29:39)

    Lone_Wolf wrote:
    @ stringchopper
    The file(s) that need patching are mentioned in the patch, so you don't have to know yourself where they are.
    patch files like these are usually applied from the directory where you build stuff.
    On your system that is probably this folder :   /home/briphi/builds/gcc46/src/gcc-4.6.3/
    for details about the command used to apply the patch, t0m5k1's link above should help.
    Thanks Lone_Wolf for the help.  I'm suffering from information overload at the moment, so (@t0m5k1) even though I found the same results that you found through google, they weren't explicit enough.

  • [SOLVED]How to stop the screen from shutting it self off?

    First of all, spare me the "search/man/wiki-first"-talk becouse I have already done that as far as my knowledge of the subject reach. If you think you seen a thread like this with a solution, please link to it without any retarded comments.
    Now to my question: How do I , from the commandline, stop the display from shutting it self off automatically after awhile?
    Last edited by whacath (2010-02-19 11:27:12)

    To disable DPMS and screen blanking:
    xset -dpms s off

Maybe you are looking for

  • Two accounts in Mail

    I have recently inherited a Macbook Pro from my boss who got a new one. He used migration assistant to transfer data and I reformatted the laptop completely to delete his username and data and start over. Now I am having a problem with Mail: In my Ma

  • Partner profile for INBOUND IDOC

    Dear experts, Need your help to define partner profile for inbound idoc to R/3 system. There is a third party (Non SAP) based application from which idocs need to be sent to the R/3 system. There is no need to send an outbound idoc from the R/3 syste

  • I can't install Adobe Photoshop CS4 extended at all

    I downloaded Adobe Photoshop CS4 Extended (Trial Version) from the Adobe.com website through Akamai downloader. Well, i tried to install it clicking on the set up, but it started to install and a few minutes later stopped and displayed a error messag

  • Adding printer marks the quick way

    Is my workflow sound? I print a magazine that has many many ads submitted by clients via pdf and the ads invariably  fail to contain printer marks, have no bleed set and are of improper page size. The ads are big enough to cover the proper page size

  • Explanation of Restore File?

    Boy, its been weird around here the last few days. Complaints about typical problems with new products are now being taken to the nth degree. I sure hope everyone gets good news no matter which way it goes for them and things return to a little more