Solution: follow the guide and in the iptables section replace the line that similar to the what I'm posting now and you'll be golden. I'm a total linux noob and got it to work. If you want to make life easier for yourself get putty and filezilla to interact with your VPS. Here is the line that should change in the guide:
iptables -t nat -A POSTROUTING -j SNAT --to-source YOURVPSIP
I've followed this guide to the letter and finally managed to get OpenVPN to start and I can even connect to via OpenVPN but I don't have contact to the outside world from there onwards. No internet, nothing. I tried a traceroute and he just gets to the server and that's where he stays. I'm no good with OpenVPN so I don't know where to start looking for a possible error source.
I'd appreciate any help.
Cheers
[SOLVED] Can connect to server but not internet
Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech
Forum rules
Please visit (and READ) the OpenVPN HowTo http://openvpn.net/howto prior to asking any questions in here!
Please visit (and READ) the OpenVPN HowTo http://openvpn.net/howto prior to asking any questions in here!
-
- OpenVpn Newbie
- Posts: 2
- Joined: Mon Dec 20, 2010 10:18 am
[SOLVED] Can connect to server but not internet
Last edited by hypertyper on Wed Dec 22, 2010 8:58 pm, edited 1 time in total.
-
- OpenVpn Newbie
- Posts: 13
- Joined: Tue Oct 26, 2010 8:26 am
Re: Can connect to server but don't have internet afterwards
it would help to know a little bit about your setup, config files etc, firewall rule (if any) etc.
-
- OpenVpn Newbie
- Posts: 2
- Joined: Mon Dec 20, 2010 10:18 am
Re: Can connect to server but don't have internet afterwards
Sorry my post isn't very good. I was sleep deprived and desperate. I think I've narrowed it down to the ip table because I can connect which I assume wouldn't be possible if something major was messed up. This is the config from the guide that I posted, which is what I'm using. I don't want to post the whole article but this should be the interesting bit.
If there is more information you need it's probablu easiest if you skim the article but I'm fairly sure this is it.
Thanks for your help.
I find this guide really good otherwise so I'm hoping that fixing this will help a lot of people.
I haven't been able to test it but this has been suggested to me:
iptables -t nat -A POSTROUTING -j SNAT --to-source YOURVPSIP
Cheers
Code: Select all
#!/bin/sh
iptables -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -s 10.8.0.0/24 -j ACCEPT
iptables -A FORWARD -j REJECT
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE
touch /var/lock/subsys/local
Thanks for your help.
I find this guide really good otherwise so I'm hoping that fixing this will help a lot of people.
I haven't been able to test it but this has been suggested to me:
iptables -t nat -A POSTROUTING -j SNAT --to-source YOURVPSIP
Cheers