I will be implementing an application to a VPN network. But my problem is how does VPN work? I will be using a mysql database and basically it will be all about ip address and ports. If i connect a computer that will serve as a server in a VPN network would it be like doing it in a normal LAN? how about IP address? I would be very happy if someone can answer this question.. thanks!

Dani AI

Generated

Short practical primer for (building on points from , , and ): a VPN can make remote hosts reachable like a LAN at the IP layer, but how “LAN-like” it feels depends on the VPN type (routed vs bridged), addressing, and tuning. Choose routed (layer‑3) unless you specifically need broadcast/ARP transparency — routing is simpler and scales better. OpenVPN: routed vs bridged guide. (openvpn.net)

Plan addressing and names carefully: use private address space for the VPN and avoid overlapping subnets between sites (renumber or use NAT translation if you cannot change addresses). Give the MySQL host a static VPN address or a predictable DHCP static-mapping, and use that IP (or an internal DNS name) for your app. See RFC 1918 for private address guidance. RFC 1918 (private address ranges). (rfc-editor.org)

MySQL-specific checklist (common gotchas):

  • Bind the server to the VPN interface (or to specific addresses) so it listens where you expect. Example snippet for mysqld config:
    [mysqld]
    bind-address = 10.50.10.2
    require_secure_transport = ON

    Adjust firewall so only the VPN subnet can reach port 3306 (or change the port). Test with nc -vz <db-ip> 3306 and mysql -h<db-ip> -u user -p. See MySQL docs for bind-address and encrypted connections (use TLS / require_secure_transport). (dev.mysql.com)

Troubleshooting & performance notes: if you can ping but database connections stall, check firewall/SELinux, MySQL grants (user@host), and whether mysqld is listening on the expected socket. VPN tunnels can suffer MTU/MSS fragmentation that breaks larger packets — tune mssfix/MTU on the tunnel if you see partial transfers. For chatty or latency‑sensitive workloads, prefer local read replicas or an API layer rather than running frequent, synchronous DB calls across a high‑latency VPN. . ()

Recommended Answers

All 5 Replies

A vpn basicall piggy back on a existing connection - in that it create a secure connection between two points.

So if you can imagine a public road between A and B, also on that road is protected private lane for just you and nobody else. The public road is the internet and the private lane is the vpn.

After the vpn is created you can use any protocal or port number you want to use. So yes the vpn is like a normal lan except it offer a bit more security.

hope this helps.

Thanks.. So does this mean that i can use an ip address such as in a vpn? does it have restrictions on ip addresses to be used since its connectd via internet?

everything depends on the way your VPN is set up

I will be implementing an application to a VPN network. But my problem is how does VPN work? I will be using a mysql database and basically it will be all about ip address and ports. If i connect a computer that will serve as a server in a VPN network would it be like doing it in a normal LAN? how about IP address? I would be very happy if someone can answer this question.. thanks!

actually vpn is defined as network infrastructure connective deployed on a shared network with same policies and security as a private network. i will work depend on ur router. which type router ur using and which version of IOS ur using. vpn has two mode tunnel mode and transport mode. following are the configuration of vpn
crypto isakmp policy 1
encr 3des
hash md5
authentication pre-share
group 2
crypto isakmp key cisco address (ip address of remote router)
crypto ipsec transform-set (transform set name) esp-3des esp-md5-hmac
crypto map (map name) ipsec-isakmp
set peer (remote router or peer router)
set transform-set (transform set name)
match address ( access list no.)


configure same setting to ur peer router then it will work . and u should configure nat pool or pat and router will be 1800 series later and ios should support vpn. IP address means it using for idenfiying the devices. ip address have 4 classess A class range 1-126,
B class 128-191, C Class 192-223 and C & D class using for multi casting and experimental purpose. and also these three have private ip address it is normaly using for our lan network
if u have more dout about networking just mail me


with regards
inshad

yes you can and should use internal IPs

We have a 7 site network

Site 1 HQ
Site 2 Branch
.....
Site 10 Branch

you can ping any ip address on site 1 from any other computer on any site and vise versa.

Basicly think of a vpn as a virtual route across the internet.

Each Firewall that is part of the vpn has an agreement with the HQ firewall.

So each branch office firewall knows if they need to send data to 10.10.1-10.0 (other then thir local subnet) to send it to the firewall via the vpn tunnel

Read up on site to site VPNs.
There are also dialin VPNs but thats for users that work from home to access network resources securely.

http://computer.howstuffworks.com/vpn3.htm

VPNs are great, even better is Metro Ethernet and MPLS! But that very costly

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.