It is currently 22.08.2017 20:26


All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Redirect-gateway without iptables
PostPosted: 10.09.2011 10:14 
DES
DES

Joined: 10.09.2011 09:51
Posts: 1
Hi,

I have a issue that I cant find a solution for. I hope that I can get same help with this!

I am trying to setup a VPN to routing all client traffic (including web-traffic) through the VPN. This is not that hard to do, but my problem is that my qnap do not have iptables installed (and there is no way for me to install it), so I cant run "iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE" command.

Is there anyway to make this work without iptables?

My server config is:
    # OpenVPN server configuration QNAP NAS
    # basic settings
    proto udp
    dev tun
    # detect mtu if the connection is slow.
    ; mtu-test
    # define mtu, if necessary
    ; tun-mtu xyz
    #
    # data compression
    comp-lzo
    # allow, that several clients with the same common name log on
    ; duplicate-cn
    # different clients can "see" each other through the tunnel.
    ; client-to-client
    # Keepalive
    keepalive 15 120
    # verbosity of status messages in the console. Activate for debugging (1-9 possible)
    verb 3
    # Log files
    status /opt/etc/openvpn/log/status.log
    log-append /opt/etc/openvpn/log/openvpn.log
    # Run as daemon (activate, after everything is set up properly)
    daemon
    # Management Interface. Access with "telnet localhost 7505"
    management localhost 7505
    #
    server 10.8.0.0 255.255.255.0
    port 1194
    dh /opt/etc/openvpn/keys/dh1024.pem
    ca /opt/etc/openvpn/keys/ca.crt
    cert /opt/etc/openvpn/keys/Storage.crt
    key /opt/etc/openvpn/keys/Storage.key
    # route
    push "redirect-gateway def1"
    push "dhcp-option DNS 87.9.224.2"
    push "dhcp-option DNS 192.168.1.1"
    push "dhcp-option DNS 87.9.214.7"
    push "route 192.168.1.0 255.255.255.0"
    up ./openvpn.up

openvpn.up;
Code:
#!/bin/sh
route add -net 10.8.0.0 netmask 255.255.255.0 gw 192.168.1.2



my server has the ip 192.168.1.2 and my router has the ip 192.168.1.1.


Top
Offline Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ]  Moderator: Moderators

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Theme created StylerBB.net