Results 1 to 16 of 16
  1. #1

    Help: US Geolocation with BuyVM KVM

    Hi,

    I have a KVM-128 with buyvm.net. I assumed that the public IP (209.141.60.x) would be in the US, but it's always geolocated as being in Canada. I have asked for a US-based IP address via ticket, but that hasn't worked out. I am aware of the advice in the buyvm wiki (h**p://wiki.frantech.ca/index.php/US_VPN#US_VPN), but that hasn't really helped either (see below)...

    I have set up the KVM using Ubuntu 10.04-x86, and OpenVPN-AS (Access Server) v1.8.3. I have everything working fine, except for the geolocation. The system is almost vanilla-flavoured (i.e. minimally configured,) including:

    Code:
    root@tunnel:~$ cat /etc/network/interfaces
    # The loopback network interface
    auto lo
    iface lo inet loopback
    
    # The primary network interface
    auto eth0
    iface eth0 inet dhcp
    
    # The internal network interface
    auto eth1
    iface eth1 inet dhcp
    Which leads to (NB: no gateway for eth1):

    Code:
    root@tunnel:~$ cat /var/lib/dhcp3/dhclient.leases
    lease {
      interface "eth0";
      fixed-address 209.141.60.XXX;
      option subnet-mask 255.255.255.0;
      option routers 209.141.60.XXX;
      option dhcp-lease-time 21600000;
      option dhcp-message-type 5;
      option domain-name-servers 205.185.112.XXX,205.185.112.XXX;
      option dhcp-server-identifier 205.185.112.XXX;
      renew 3 2012/05/23 00:14:38;
      rebind 6 2012/09/22 15:32:41;
      expire 2 2012/10/23 21:32:41;
    }
    
    lease {
      interface "eth1";
      fixed-address 172.16.191.XXX;
      option subnet-mask 255.255.0.0;
      option dhcp-lease-time 21600000;
      option dhcp-message-type 5;
      option dhcp-server-identifier 205.185.112.XXX;
      renew 0 2012/05/20 19:25:12;
      rebind 6 2012/09/22 14:07:01;
      expire 2 2012/10/23 20:07:01;
    }
    FWIW, here's my route table.

    Code:
    root@tunnel:~$ route
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    209.141.60.0    *               255.255.255.0   U     0      0        0 eth0
    5.5.0.0         *               255.255.248.0   U     0      0        0 as0t0
    5.5.8.0         *               255.255.248.0   U     0      0        0 as0t1
    172.16.0.0      *               255.255.0.0     U     0      0        0 eth1
    default         209.141.60.1    0.0.0.0         UG    0      0        0 eth0
    I have mainly used scripts to configure OpenVPN-AS, including:

    Code:
    wget h**p://swupdate.openvpn.org/as/openvpn-as-1.8.3-Ubuntu10.i386.deb
    sudo dpkg -i openvpn-as-1.8.3-Ubuntu10.i386.deb
    sudo ovpn-init --batch --force --host=tunnel.domain.com
    And, I have done the following:

    Code:
    VLAN=`ifconfig | grep 172 | awk '{print $2}' | cut -d ":" -f2`
    sudo iptables -t nat -A POSTROUTING -s 5.5.0.0/20 -j SNAT --to-source $VLAN
    But it don't work. I guess I need to have a route out via 172.16.x.y, but there is not gateway in any case?

    Any advice from anyone?

    In return, I would be willing to post my complete set of configuration scripts when I've got them working...
    Last edited by zxdavb; 02-16-2012 at 06:25 PM.

  2. #2
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    5,073
    If you're having some quirky stuff we can assign you a true US IP if you log a ticket.

    I need to update the wiki to document how KVM's can use the US setup, just been caught up with things

    Francisco
    BuyVM - OpenVZ & KVM Based VPS Servers - Chat with us
    - All popular VPN methods supported
    - Affordable offloaded MySQL & DDoS protection
    - 5GB backup space, unmetered private LAN bandwidth & native IPv6 included. All with a strong serving of pony

  3. #3
    Francisco, thanks for a quick reply.

    I have been trying to get this working for a while...

    A US-located IP address would solve all my problems, so a ticket has been logged.

    Thanks, Dave

  4. #4
    Francisco,

    I refer to ticket #227500: Anthony says that there's no US-based IP addresses to be had at all, and apparently no options for NATing through one other than via an OpenVZ VPS (which I understand wont work with OpenVPN-AS).

    Could you have a look and see what options there may be for me to move forward with?

    Dave

  5. #5
    OK fixed now.

    We tried to get the US VPN working, but it was beyond my technical skills to integrate it with OpenVPN-AS, so just settled for a US-based address. I was able to ping 8.8.8.8 through both interfaces (but not whilst both were up).

    I include the following section of /etc/network/interfaces here, just in case someone can run with it in the future...

    # The internal (private) network interface
    auto eth1
    iface eth1 inet dhcp
    up ip route add default via 172.16.0.254 dev eth1 table 100
    # down ip route del default via 172.16.0.254 dev eth1 table 100
    up ip rule add from 172.16.0.0/16 iif eth1 lookup 100
    # down ip rule del from 172.16.0.0/16 iif eth1 lookup 100
    up iptables -t nat -A POSTROUTING -s 5.5.0.0/20 -j SNAT --to-source 172.16.191.125
    down iptables -t nat -D POSTROUTING -s 5.5.0.0/20 -j SNAT --to-source 172.16.191.125
    Thanks, Francisco, for taking an interest.

    -zxdavb

  6. #6
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    5,073
    Yea, i'll have to figure out the source routes for the KVM stuff

    Thanks for the attempt

    Francisco
    BuyVM - OpenVZ & KVM Based VPS Servers - Chat with us
    - All popular VPN methods supported
    - Affordable offloaded MySQL & DDoS protection
    - 5GB backup space, unmetered private LAN bandwidth & native IPv6 included. All with a strong serving of pony

  7. #7

    Question

    Hey folks, did you have any luck getting this working on KVM? Unfortunately I can't use any of the 205.x.x.x IPs as the routing from where I'm based is worse than using the 209.x.x.x IPs for some reason.

    On OpenVZ I had VPN traffic routing over the private IP with no problems, but it doesn't seem to work on KVM.

    In addition if I ping as follows I get interesting results:

    Code:
    ping -I <external IP> 8.8.8.8
    works fine

    Code:
    ping -I <internal private IP> 8.8.8.8
    works on OpenVZ, but not working at all on KVM

    Thanks!

  8. #8
    I had the ping working through both interfaces, but only one at a time. It depended upon the contents of my route table (or if the other was ifdown'd).

    HTH, Dave

  9. #9
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    5,073
    You have to setup some funky source routes.

    If you like you can log a ticket to see about snagging a US IP and see if that fixes up whatever funky routes you might have

    Francisco
    BuyVM - OpenVZ & KVM Based VPS Servers - Chat with us
    - All popular VPN methods supported
    - Affordable offloaded MySQL & DDoS protection
    - 5GB backup space, unmetered private LAN bandwidth & native IPv6 included. All with a strong serving of pony

  10. #10

    Thanks Francisco. With a previous OpenVZ VPS I had, I requested an IP change to a US-based IP - the geolocation was completely fixed, but unfortunately many of my clients in China complained that they were seeing occasional dropped packets between China and the VPS using the new IP. I assume that 205.x.x.x gets routed differently to 209.x.x.x.

    I'm still hoping I can find a solution to get NATing in place for the private IP so that clients still connect over the stable 209.x.x.x IP and also benefit from having US geolocation. Is this something that needs to be worked out on the guest side (so I know to continue investigating) or on the host side?

    Thanks!

  11. #11
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    5,073
    It's entirely on the guest side

    I'll play with the VPN this weekend and see if I can get the source routing to work properly. We actually had to setup custom source routing rules on our OpenVZ nodes so they would handle the VLAN traffic properly, but it seems copying the same rulesets to our KVM's isn't playing quite right.

    We'll see for sure

    Francisco
    BuyVM - OpenVZ & KVM Based VPS Servers - Chat with us
    - All popular VPN methods supported
    - Affordable offloaded MySQL & DDoS protection
    - 5GB backup space, unmetered private LAN bandwidth & native IPv6 included. All with a strong serving of pony

  12. #12
    Thanks Francisco, appreciate anything you might find! I'll also share back here if I find a solution.

  13. #13
    Francisco,

    I have one openvz and one kvm machine with buyvm. I often use a socks proxy
    rather than a vpn. When I use the openvz machine as a socks proxy google sends me to their Hong Kong site Google.com.hk and translates to Manderin, the KVM machine works fine. Any idea what's going on?

    efball@efball.com

  14. #14

    *

    Hi,

    I have the same issue. I signed up for the Buffalo - OpenVZ - NY BuyVM-128MB plan. I thought I would get a US IP but I got a Canadian IP in BC instead. I opened up a service ticket on buyvm - ticket ID #540223. Hope someone from BuyVM will be able to help me out.

    Thanks,

  15. #15
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    5,073
    Quote Originally Posted by thirtyfivefifty View Post
    Hi,

    I have the same issue. I signed up for the Buffalo - OpenVZ - NY BuyVM-128MB plan. I thought I would get a US IP but I got a Canadian IP in BC instead. I opened up a service ticket on buyvm - ticket ID #540223. Hope someone from BuyVM will be able to help me out.

    Thanks,
    http://wiki.buyvm.net/index.php/vpn#us_vpn

    Read the part about the US VPN

    We're working on a fix that doesn't require this but ARIN has been dragging their feet on the subject.

    Francisco
    BuyVM - OpenVZ & KVM Based VPS Servers - Chat with us
    - All popular VPN methods supported
    - Affordable offloaded MySQL & DDoS protection
    - 5GB backup space, unmetered private LAN bandwidth & native IPv6 included. All with a strong serving of pony

  16. #16
    Quote Originally Posted by DeltaAnime View Post
    http://wiki.buyvm.net/index.php/vpn#us_vpn

    Read the part about the US VPN

    We're working on a fix that doesn't require this but ARIN has been dragging their feet on the subject.

    Francisco
    Thanks a lot. The workaround worked. Cheers!

Similar Threads

  1. Need Some Help editing?
    By TheProxyHoster in forum Design Requests
    Replies: 3
    Last Post: 06-08-2009, 11:21 PM
  2. editing
    By McLouf in forum Web Hosting
    Replies: 4
    Last Post: 03-21-2008, 08:42 AM
  3. A little editing?
    By AnomalousSilence in forum Employment / Job Offers
    Replies: 10
    Last Post: 04-10-2006, 06:29 PM
  4. Editing....
    By Carp in forum Web Hosting Lounge
    Replies: 3
    Last Post: 04-11-2005, 11:07 PM
  5. editing...
    By beauty in forum WHT Announcements, Feedback and Questions
    Replies: 5
    Last Post: 12-24-2003, 06:17 PM

Posting Permissions

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