Find the answer to your Linux question:
Page 2 of 2 FirstFirst 1 2
Results 11 to 15 of 15
I admit that with the lport change was just a stab in the dark. Change that back to 1194 to prevent any interference. Also it might be a good idea ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #11
    Just Joined! TinoY's Avatar
    Join Date
    May 2012
    Location
    Slovakia
    Posts
    9

    I admit that with the lport change was just a stab in the dark.

    Change that back to 1194 to prevent any interference.

    Also it might be a good idea to back up your config files and start with a simple vpn set up and work forward from there:

    Server
    Code:
    dev tun
    ifconfig 10.8.0.1 10.8.0.2
    secret static.key
    keepalive 10 60
    Client
    Code:
    remote myremote.mydomain
    dev tun
    ifconfig 10.8.0.2 10.8.0.1
    secret static.key
    keepalive 10 60
    Replace the ips and hosts as necessary. If i understand correctly not specifing any port will use the daemons default 1194

    Also make sure that udp port 1194 is open on the server side
    Also check if the tun or tap interface is not blocked in any way

    A question: You want that application to go throught the vpn ? Or you want to connect to the web yourself using vpn without messing the application up ?

    EDIT: Also maybe this webpage may give you more tips openvpn.net/index.php/open-source/documentation/miscellaneous/78-static-key-mini-howto.html
    Last edited by TinoY; 07-21-2012 at 04:41 PM. Reason: Addition

  2. #12
    Just Joined!
    Join Date
    Jul 2012
    Posts
    9
    I want the application to go through the VPN..

  3. #13
    Just Joined! TinoY's Avatar
    Join Date
    May 2012
    Location
    Slovakia
    Posts
    9
    In that case, you could try to port forward outgoing connections from the local port 8080 to 1194 (or whatever you specified in lport/rport)

    That is, if you cant change the settings in the application itself.
    Last edited by TinoY; 07-21-2012 at 05:07 PM. Reason: Typo

  4. #14
    Just Joined! TinoY's Avatar
    Join Date
    May 2012
    Location
    Slovakia
    Posts
    9
    I think this might be what you are looking for.
    application:8080 -> Connecting to the vpn server :1194 -> forward to the service destination :someport

    linkw)(w)(w).monkeedev.co.uk/blog/2009/04/03/simple-port-forwarding-using-iptables/

    Copy-pasted:
    Code:
    iptables -t nat -I PREROUTING 1 -i eth0 -p tcp –dport 143 -j DNAT –to-destination 10.1.0.2:143
    iptables -t nat -I POSTROUTING 1 -o eth0 -p tcp -d 10.1.0.2 –dport 143 -j SNAT –to-source 10.1.0.3

  5. #15
    Just Joined!
    Join Date
    Jul 2012
    Posts
    9
    This worked:
    Code:
    iptables -t nat -A PREROUTING -i tap0 -p tcp -m tcp --dport 8080 -j DNAT --to-destination 172.16.0.2:1194
    Thank you for the help!!

Page 2 of 2 FirstFirst 1 2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •