[Webinar] Streamline your web hosting managementRegister Today


OpenVPN automatic iroute?

Posted on 2008-02-07
Medium Priority
Last Modified: 2008-04-02
Hello Experts,
I have a really interesting question.
When a client is connecting to OpenVPN and he is not having a public IP but has a LAN IP, OpenVPN prints an error " MULTI: bad source address from client" and drops the packets. Therefore, the client is not able to surf internet. However, this can be fixed by using ccd directory and adding the iroute option to his network and then adding route option to server.conf.
Do you know a way how to automatically add an iroute when client is connecting without making this whole procedure so he is able to successfully use the OpenVPN?
Thank you very much. Your help is highly appreciated.
Question by:lam4o1
  • 4
  • 2
LVL 19

Expert Comment

by:http:// thevpn.guru
ID: 20846255
You might want to have a look at the redirect-gateway option ..this will allow the clients to browse the net through the openvpn server network

Author Comment

ID: 20846355
Hi, this setting is enabled and users with public IP are able to surf without problems.
LVL 19

Expert Comment

by:http:// thevpn.guru
ID: 20848625
This setting should set the OpenVPN server to be the gateway..you have to enable forwarding and masquerading on the openvpn server

iptables -t nat -A POSTROUTING  -j SNAT --to-source ip.of.vpn.server
echo 1 > /proc/sys/net/ipv4/ip_forward
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.


Author Comment

ID: 20848909
No, it doesn't help. You have to iroute the client's private IP and then to route in the main config so the kernel knows about it. I am asking if this could be done automatically like a starting script using --client-connect

Author Comment

ID: 20917981
I found the reason of why client can't connect to Internet.
It should be some DNS problem. Client can connect to any website by IP address but it can't resolve it using the hostname. Can you help solving this. I already tried pushing the dns and wins to the client but it didn't help. Is it a server setting?

Accepted Solution

lam4o1 earned 0 total points
ID: 21200418
It was the DNS resolving

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently attended Cisco Live! in Las Vegas, a conference that boasted over 28,000 techies in attendance, and a week of hands-on learning hosted by a solid partner with which Concerto goes to market.  Every year, Cisco displays cutting-edge technol…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

591 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question