Go Premium for a chance to win a PS4. Enter to Win

x

Linux Networking

17K

Solutions

14K

Contributors

The variety of Linux distributions creates myriad issues relating to configuration and operations when computers are networked, not the least of which is the use of various network management applications, some of which are included with specific distributions, while others are standalone applications.

Share tech news, updates, or what's on your mind.

Sign up to Post

Note: for this to work properly you need to use a Cross-Over network cable.

1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provider's network that provides you or your server with internet access.

2. On server [S1], type "ifconfig eth1 192.168.1.1"  and

3.  On server [S2], type "ifconfig eth1 192.168.1.2"

4. While still on server [S2], type "ping 192.168.1.1" to see if you can see server [S1] successfully.

One can also type just "ifconfig" to see all their existing network connections

Thats all.

NB: By default this local area network configurations are not persistent unlike the public IP address once so every-time you restart a server the configuration is going to be lost. In order to by-pass this you do the following:

1. Go and edit file "/etc/network/interfaces"

    i.e. sudo nano /etc/network/interfaces # you can also use "ed" instead "nano" or "vi"

2. Add line "auto eth1" below "auto eth0" settings

3. Add these lines right after your "eth1 auto"

 
   iface eth1 inet static
         address 192.168.1.2
         netmask 255.255.255.0
         network 192.168.1.0
         broadcast 192.168.1.255

Open in new window

4. Restart the network: sudo /etc/init.d/networking restart

5. Then restart the server and see if it works

That's all.

In case you want to copy data to and fro here is the command that you can use:

 
wget -b ftp://username:password@192.168.1.1//bckupfolder/file.tar.gz -O /bckupfolder/`date +"%Y-%m-%d"`/file.tar.gz;

Open in new window


this transfers a file called "file.tar.gz" from server [S1] into server [S2] into a folder called "backupfolder" so this command has to be run in server [S2].
1
 
LVL 2

Author Comment

by:Eric Mulovhedzi
Comment Utility
Nice,

Thanks.
0
 
LVL 62

Expert Comment

by:gheist
Comment Utility
In last ten years adapters are madie with auto-MDI/x PHYs, so cros-over cables are not needed.
0
Veeam Disaster Recovery in Microsoft Azure
LVL 1
Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.  

IT can be done and here's how to get it working:

In this example, I have an external NTFS Gigabyte drive that I called "Store01".  This volume contains a directory called "/ftp".  Anonymous ftp clients should be able to upload to what is seen thru FTP as "/ftp/pub", and I want these files to actually show up in /ftp on my external NTFS drive.

The first requirement is that vsftpd wants the anonymous root directory to be owned by ftp:ftp

You'll need to find the right id so look in the user file to find the id for ftp. In this case:
cat /etc/passwd

Open in new window

Again, in this case my system ftp is userid 14

Next look in the groups file to find the id for the ftp group:
cat /etc/group

Open in new window

In this example, the ftp group is 50

Next, look to see what device name my NTFS volume has:
fdisk -l

Open in new window

On my system, my NTFS volume is shown to be called: /dev/sdc1

Now create a mount point for it thus (I'm arbitrarily calling it "Store01":
mkdir /mnt/Store01

Open in new window


in /etc/fstab, this line gets the NTFS volume mounted at /mnt/Store01:
/dev/sdc1    /mnt/Store01    ntfs-3g    nls=utf8,auto,user,rw,uid=14,gid=50,umask=0000,defaults 0 0

Open in new window

Note that it is going to belong to user 14, which is ftp on my system, and group 50, which is ftp on my system.  VSFTPD requires that anonymous upload directories to belong to ftp:ftp

Now define a mount point you want to use as your ftp anonymous root:

Open in new window

1
 
LVL 7

Expert Comment

by:MHenry
Comment Utility
Hi Carman23,

I'm a Page Editor for EE and I'll be helping you get your article published. I'll look through it shortly. Just wanted to let you know it's in the process.

And sorry for the delay.

Best,
MH

0
 
LVL 2

Author Comment

by:Carman23
Comment Utility
Oh yes, thanks for doing that.
0

Linux Networking

17K

Solutions

14K

Contributors

The variety of Linux distributions creates myriad issues relating to configuration and operations when computers are networked, not the least of which is the use of various network management applications, some of which are included with specific distributions, while others are standalone applications.