As others have pointed out. A lot of the answer and success of it depends on the ability for the 2 machines to communicate. so is DNS configured? Firewalls? Can you ping? Can you resolve machine names? Can you otherwise communicate from one server to the other? The difference of creating a linked server from your local machine and a remote server and vice versa is actually just reversing the information. your Local machine still needs to be a server with the appropriate configuration and permissions granted, but if it is then it is just another SQL server. A linked server only relys on having 2 SQL servers that are able to communicate.
Because I often work remote (VPN) and servers cannot always resolve my machines DNS name I use the following script to create a linked server on a remote server to connect to my local machine via IP address I am connected to the server via SSMS with:
DECLARE @AutoExecute BIT = 1
DECLARE @LinkedServerName VARCHAR(50) = 'LinkedServername' --if null or blank the linked server will just get the instance name
DECLARE @InstanceAppend VARCHAR(45) = '\InstanceName' --make emptry string if none
DECLARE @user VARCHAR(20) = 'username'
DECLARE @password VARCHAR(20) = 'password'
DECLARE @SQL VARCHAR(MAX)
DECLARE @IPAddress VARCHAR(255)
DECLARE @Instance VARCHAR(300)
DECLARE @SrvName VARCHAR(300)
SELECT @IPAddress = client_net_address
,@Instance = client_net_address + ISNULL(@InstanceAppend,'')
FROM
sys.dm_exec_connections
WHERE Session_id = @@SPID;
SET @SrvName = CASE WHEN LEN(@LinkedServerName) > 0 THEN @LinkedServerName ELSE @Instance END
IF NOT EXISTS (SELECT * FROM sys.servers WHERE name = @SrvName)
BEGIN
IF (LEN(@LinkedServerName) > 0)
BEGIN
SET @SQL = 'EXECUTE master.dbo.sp_addlinkedserver @server = N''' + @LinkedServerName + ''',@provider=''SQLOLEDB'', @srvproduct=N'''', @datasrc=N''' + @Instance + ''''
END
ELSE
BEGIN
SET @SQL = 'EXECUTE master.dbo.sp_addlinkedserver @server = N''' + @Instance + ''', @srvproduct=N''SQL Server'''
END
SET @SQL = @SQL + CHAR(13) + 'EXECUTE master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N''' + @SrvName + ''',@useself=N''False'',@rmtuser=''' + @user + ''', @rmtpassword=''' + @password + ''''
END
ELSE
BEGIN
PRINT 'Linked Server Exists'
END
PRINT @SQL
IF (@AutoExecute = 1)
BEGIN
BEGIN TRY
EXECUTE (@SQL)
PRINT 'Executed Successfully'
END TRY
BEGIN CATCH
PRINT 'Failed To Execute'
;THROW
END CATCH
END