Copy files through specific Lan card of the source server - networking

I want to copy backup from one server to another on daily bases. I would like to create any Script or SSIS package to do so. I cannot run that script from the destination server.
The source server has two LAN cards connected to the network with different IPs (obviously). One IP is used by the application and I want to use the other IP to copy the backup so that it may not affect the application performance.
Could you please guide me that how will I specy the specific IP of the source server through which i can copy the data to the destination server?
Thanks!

I'll call the two NICs Primary and Secondary. Primary is your NIC for your application. Secondary is your management NIC.
One approach you can use is to configure two DNS names for your host, one per IP address, with at least two IP addresses, one on each NIC. With the name that resolves to the IP address which is on the Secondary NIC (secondary.example.com), would this work for you?
strarc64 -c -mf backup.bin \\secondary.example.com\c$\path\to\backup
You can get strarc/strarc64 from here, and its usage here

Related

Connect to OpenStack instance via the internet through the router

I've recently found out that the external network for our OpenStack (Ocata) setup has maxed out on the available IP addresses in its allocation table. In fact, it has over-allocated with -9 free IPs. So, to manage the limited IP addresses, is it possible to access an instance in a project directly from an external network (internet) via the project's router? This way only a single IP address needs to be allocated per project instead of allocating to multiple instances per project.
The short answer would be NO, but there are couple of workarounds that came to my mind (not that they will be good, but they will work).
In case any instance in your private network has floatingIP, you can use that host as a jump-host (bastion-host) to SSH into the target host. This also brings the benefits of port forwarding/SSH tunneling to the table if you want to access to some other port.
You can always access to any host on private networks through qdhcp or qrouter namespace from the network node
ip netns exec qdhcp-XXXXXXX ssh user#internal-IP

How to force IP packets over a specific server?

I need to configure hosts to route their network packets in a way that they pass another specific server (in my own network) before they reach their destination.
An example network setup can be seen at the following link which was provided by StackOverflow:
I have two hosts (Host-1 and Host-2) which communicate with each other over a Gateway/Router in a star network. The specific server (called NetEM-Host) is needed for NetEM manipulation and also connected to the Gateway.
Now, every packet that the two hosts send needs to be first routed over NetEM-Host and only afterwards reach its destination.
How can I configure the network in this way, without altering the Gateway?
(FYI: The Gateway was configured by OpenStack and I cannot SSH on it to change things.)
I was thinking about altering the routing table ("route") of Host-1 and Host-2 but the NetEM-Host would not be the next-hop for the two hosts and thus I cannot define it there, am I correct? Any suggestions are welcomed!

How does gethostbyaddr work on networks without an internal DNS server?

If I run socket.gethostbyaddr(ip) in Python for example, I can get back the host name of the device with the specified IP address.
I understand that large networks have internal DNS servers to keep track of the IP host pairings, but how is this task accomplished on small home networks without an internal DNS server?
If you are trying to resolve names for hosts on your LAN, you may choose to populate your hosts file (/etc/hosts on typical *nix systems) with static entries for your local hosts. Generally, by default, the resolver consults the hosts file before going out to the DNS servers provided by your ISP.
If the hosts on your LAN are themselves using dynamic addressing through DHCP for address assignment, then you are facing a more dicey solution. I tend to stick with static addressing on my house LAN for just this reason.

Access website over local network from other devices?

I have a website that I'm running locally at localhost:8000. I'd like to access my site from other devices on my network. I've tried to visit the site via my computer's internal IP address via: 127.0.0.1:8000but this doesn't work. Is this possible?
Three most probable things:
Check if there is a network route between the client and the server machine (commands like PING and TRACERT will help);
Check if the server machine has a firewall. If it does, there must be a rule allowing (opening) connections through that port (8000) in TCP;
Most likely, the problem is one of the two above. If not, there's one last thing:
Make sure the web server (the one that serves localhost:8000) is bound to listen to all IP addresses (not only 127.0.0.1).
To know that, search for servername bind all ip addresses on google. E.g., for apache HTTPD, it'd be apache bind all ip addresses.
here is what I do in similar cases:
search rejetto hfs on google, it is single executable less than 1Mb size and download it into your server machine.
after starting it, follow menu->IP addresses. these are all your possible addresess on the server side.
these are your IP addresses to enter, and your port is 8000 as you mentioned.
most possible IP addresses you will find are in the format of following:
192.168.?.?
10.0.0.?
169.254.?.?
besided you will probably need to add a firewall rule for your server app.

How do you go about setting up a virtual IP address?

... say for CentOS?
From what I understand a virtul IP can let you abstract the address from the physical interface(s) the traffic actually goes through. If your server has two network cards it can have a single virtual IP and have the traffic go through either network physical interface. If hardware failure occurs on one of the two network cards, the traffic can keep going with the second one as a backup. I assume that this is more relevant on servers where such parts can be hotswapped.
A Virtual IP address is a secondary IP set on a host, it's just another IP bound to an adapter (adapters if bonded). This IP is useful for many things but most commonly used for webservers to run multiple SSL certificates for multiple sites.
In CentOS you pretty much copy the /etc/sysconfig/network-scripts/ifcfg-eth0 (whichever for the adapter you want) to /etc/sysconfig/network-scripts/ifcfg-eth0:1, In there change the devicename=eth0 to devicename=eth0:1 and change the IP for the new "virtual IP" you want.
Check out this article on Virtual IP address. As indicated it usually floats between machines, and is sometimes used to fail-over a service from one device to another. Are you thinking of a virtual interface instead perhaps?
/Allan

Resources