0

I got an established VPN connection, but either the routing or the resolving is not working. The configuration is taken from http://louwrentius.com/blog/2011/12/setting-up-a-vpn-with-your-iphone-using-l2tp,-ipsec-and-linux/ and http://blog.bertelsen.co/2012/02/debian-squeeze-l2tpipsec-vpn-server.html

on the vpn server, doing an ngrep gives the following, whereas 85.25.128.10 is the dns server:

interface: ppp0 (10.0.1.200/255.255.255.255)
#
U 10.0.1.201:55631 -> 85.25.128.10:53
  .............login.skype.com.....
#
U 10.0.1.201:55631 -> 85.25.128.10:53
  .............login.skype.com.....
#
U 10.0.1.201:55631 -> 85.25.128.10:53
  .............login.skype.com.....
#
U 10.0.1.201:55631 -> 85.25.128.10:53
  .............login.skype.com.....
#

what happens with the dns packets? i cannot load any sites on the iphone client side.

edit: this works until the redirect:

####
T 10.0.1.201:51936 -> 10.0.1.200:80 [AP]
  GET / HTTP/1.1..Host: 10.0.1.200..Connection: keep-alive..Accept-Encoding: gzip,     deflate..User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 6_0_1 like Mac OS X) Apple
  WebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A523 Safari/8536.25..Accept-    Language: de-de..Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*
  /*;q=0.8....
##
T 10.0.1.200:80 -> 10.0.1.201:51936 [AP]
  HTTP/1.1 302 Found..Date: Sat, 01 Jun 2013 13:40:38 GMT..Server: Apache/2..X-Powered-    By: PHP/5.3.3-7+squeeze15..Location: http://xxxxxxx.com/..Vary: Accept-Enco
  ding..Content-Encoding: gzip..Content-Length: 20..Keep-Alive: timeout=15,     max=100..Connection: Keep-Alive..Content-Type: text/html........................
##
0

Solution:

iptables -t nat -A POSTROUTING -s 10.0.1.0/24 -o eth0 -j MASQUERADE

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.