0

Bonjour,

I'm trying to learn MS SQL Server

Configuration: VMWARE 17 Pro - 3 VMs Windows Server 2019 with SQL Server 2019; Network Adapters: Ethernet0(Internet), VMware(static) ; VM Network : Host-Only static IP ;

All working well and good.

Context

Had a thought, if I add my pc(host) to the domain(Guest OS) I don't have to go each server, just run them background I'll be able to access from a single point.

Conflict

  • I was able to add my host pc to domain but DC to client connection was not good.
  • After disabling Host PC Domain firewall I was able to access but still not able to access SQL server from all Guest OS to Host PC.
  • I've already pointed my VMware network to DC but when I added DC DNS to my Internet adapter I was able to access SQL server.
  • Now I can't access my internet unless I change DNS Auto so my router can supply the DNS

Issue

Is there any way I can access my SQL server from Host PC without losing my internet connection ? Kindly suggest🙏

1

1 Answer 1

0

Okay, Seriously looked for an answer all over the place. Each time I did I've started the from scratch to understand what changes I'm doing.

This works people.

Configuration: VMware Host only setup. 3 VMs 1 DC windows serve 2019 , 2 VMs with SQL server 2019. Network Adapter: Ethernet0(Internet-Router) , VMNet1

(Kindly don't go for NAT and bridge it will overcomplete things. but you really need it do a dual network adapter one for host and one for NAT/Bridge)

  • Do static ip for Host,DC,sql1,sql2. Make sure their subnet class is matching
  • Turn on Network discovery will help a lot in visual connectivity status .. just go to network in my pc it will ask to turn on just do it
  • ping from each machine. all sql,sql2 server join the dc and their dns should point to DC ip address
  • I assume sql server already installed. so go to sql configuration manager -> got network configuration 2nd option from bottom -> turn on named pipes, TCP/IP -> restart sqlserver, sql browser service.
  • Now we don't need to turn off firewall rather we will add exceptions with these cmd .Do these in host,sql1,sql2 no need in dc unless you install sql server which you shouldn't do in VM too.

netsh advfirewall firewall add rule name = SQLPort dir = in protocol = tcp action = allow localport = 1433 remoteip = localsubnet profile = DOMAIN

Powershell

New-NetFirewallRule -DisplayName "SQLServer default instance" -Direction Inbound -LocalPort 1433 -Protocol TCP -Action Allow

New-NetFirewallRule -DisplayName "SQLServer Browser service" -Direction Inbound -LocalPort 1434 -Protocol UDP -Action Allow

  • Add ip address of dc to vm hostonly adapter in preferred DNS. Now from host open up ssms try to access one of the sql server. only sql authentication will work. try to connect it will not work.

cause there 2 adapter pointing to different DNS address, if you disable Wan adapter you could connect from guest sql server to host , we need internet so

  • Just goto Wan adapter ->ipv4 properties -> preferred dns 8.8.8.8 and Alternate DNS your DC ip address. Now should be able to access internet and guest sql server to host SSMS

Well done.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .