DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 21st December 2010
guitarscn guitarscn is offline
Package Pilot
 
Join Date: Oct 2008
Posts: 166
Default Best way to transfer files from OpenBSD to Windows 7?

I have about 50GB worth of files to move, a couple files which are like 5GB in size so I don't think FAT32 would work.

In any case, I have an external hard drive with 2 partitions I already pre-formatted:

Code:
#fdisk
Disk: sd1       geometry: 12161/255/63 [195371568 Sectors]
Offset: 0       Signature: 0xAA55
            Starting         Ending         LBA Info:
 #: id      C   H   S -      C   H   S [       start:        size ]
-------------------------------------------------------------------------------
 0: 83      0  32  33 -  12033 171  42 [        2048:   193318912 ] Linux files*
 1: 0B  12033 171  43 -  12161  72   7 [   193320960:     2050048 ] Win95 FAT-32
 2: 00      0   0   0 -      0   0   0 [           0:           0 ] unused      
 3: 00      0   0   0 -      0   0   0 [           0:           0 ] unused
Here is my dmesg:

Code:
# dmesg
[snipped]
sd1 detached
scsibus2 detached
umass1 detached
umass1 at uhub0 port 1 configuration 1 interface 0 "Seagate USB Mass Storage" rev 2.00/0.02 addr 3
umass1: using SCSI over Bulk-Only
scsibus2 at umass1: 2 targets, initiator 0
sd1 at scsibus2 targ 1 lun 0: <ST910021, A, 0000> SCSI0 0/direct fixed
sd1: 95396MB, 512 bytes/sec, 195371568 sec total
It just repeats this over and over every time I unplug/plug in my external hard drive.

On the FAT32 drive, I created a test text file, but I can't seem to mount /dev/sd1i:

Code:
# mount_msdos /dev/sd1i /mnt/mount1/
mount_msdos: /dev/sd1i on /mnt/mount1/: Device not configured
I can't seem to find the ext3 partition, either. I tried mounting mount_ext2fs /dev/sd1a, sd1b, etc. all the way up to like half the alphabet.

I thought I could put the larger files into ext3, use an ext3 reader on Windows 7, and copy over the files that way. The FAT32 I was just gonna use for the smaller files (like the Firefox executable installer and such).

Does anyone have any other ideas? I have like 2 more external drives
Reply With Quote
  #2   (View Single Post)  
Old 21st December 2010
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,125
Default

What does disklabel say about the external drive?
Code:
# disklabel /dev/sd1
You could configure the ftp server in the OpenBSD box and use a ftp program on Windows 7 to retrieve/copy the files.
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
  #3   (View Single Post)  
Old 21st December 2010
guitarscn guitarscn is offline
Package Pilot
 
Join Date: Oct 2008
Posts: 166
Default

Code:
# disklabel /dev/sd1
disklabel: ioctl DIOCGDINFO: Inappropriate ioctl for device
# disklabel sd1      
# /dev/rsd1c:
type: SCSI
disk: SCSI disk
label: A               
uid: e2e2d4971d40be96
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 255
sectors/cylinder: 16065
cylinders: 12161
total sectors: 195371568
boundstart: 0
boundend: 195371568
drivedata: 0 

16 partitions:
#                size           offset  fstype [fsize bsize  cpg]
  c:        195371568                0  unused
To be honest I have never really used FTP except for downloading OpenBSD releases, much less set a server up...will this be utilizing the web to transfer files? Or will the computer be obtaining the files locally so that transfer speed isn't limited by my internet speed?
Reply With Quote
  #4   (View Single Post)  
Old 21st December 2010
girarde girarde is offline
Fdisk Soldier
 
Join Date: Nov 2010
Location: NW FL
Posts: 75
Default

smbclient will work as well (requires Samba).
Reply With Quote
  #5   (View Single Post)  
Old 21st December 2010
rocket357's Avatar
rocket357 rocket357 is offline
Real Name: Jonathon
Wannabe OpenBSD porter
 
Join Date: Jun 2010
Location: 127.0.0.1
Posts: 429
Default

WinSCP is a wonderful thing.
Reply With Quote
  #6   (View Single Post)  
Old 21st December 2010
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,125
Default

RE: disklabel output

For some unknown reason OpenBSD doesn't spoof an 'i' partition. That is why your attempt to mount sd1i doesn't work.

RE: ftp program

You can use something like http://en.wikipedia.org/wiki/FileZilla on the Windows 7 box to login to your OpenBSD ftp server and transfer the files directly.
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
  #7   (View Single Post)  
Old 21st December 2010
guitarscn guitarscn is offline
Package Pilot
 
Join Date: Oct 2008
Posts: 166
Default

What should I use as the ftp server in OpenBSD? I tried searching for a tutorial to set one up in OpenBSD but I mostly get results that involve installing OpenBSD from the OpenBSD ftp servers
Reply With Quote
  #8   (View Single Post)  
Old 21st December 2010
rocket357's Avatar
rocket357 rocket357 is offline
Real Name: Jonathon
Wannabe OpenBSD porter
 
Join Date: Jun 2010
Location: 127.0.0.1
Posts: 429
Default

Quote:
Originally Posted by guitarscn View Post
What should I use as the ftp server in OpenBSD? I tried searching for a tutorial to set one up in OpenBSD but I mostly get results that involve installing OpenBSD from the OpenBSD ftp servers
Why bother with FTP? Install WinSCP on the Win7 box, then use that to ssh/scp to the OpenBSD box and transfer files that way (to OpenBSD or from OpenBSD, doesn't matter).

Added bonus, sshd is much easier to "setup", and it encrypts traffic.
Reply With Quote
  #9   (View Single Post)  
Old 21st December 2010
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,125
Default

Starting ftpd by hand is easy
  • Become root
    Code:
    j65nko@hercules[~]su - root 
    Password: *************
  • Start the ftpd server
    Code:
    root@hercules[~]/usr/libexec/ftpd -DUS
  • Check whether ftpd is LISTENing on the ftp port 21
    Code:
    root@hercules[~]netstat -an -f inet
    
    Active Internet connections (including servers)
    Proto   Recv-Q Send-Q  Local Address          Foreign Address        (state)
    tcp          0      0  *.21                   *.*                    LISTEN
    tcp          0      0  *.6000                 *.*                    LISTEN
    tcp          0      0  *.3306                 *.*                    LISTEN
    tcp          0      0  127.0.0.1.587          *.*                    LISTEN
    tcp          0      0  127.0.0.1.25           *.*                    LISTEN
    tcp          0      0  *.515                  *.*                    LISTEN
    tcp          0      0  192.168.222.20.22      *.*                    LISTEN
    Active Internet connections (including servers)
    Proto   Recv-Q Send-Q  Local Address          Foreign Address        (state)
    udp          0      0  192.168.222.20.2628    91.198.174.197.123    
    udp          0      0  192.168.222.20.36276   131.211.84.189.123    
    udp          0      0  192.168.222.20.9945    85.17.233.194.123     
    udp          0      0  *.514                  *.*

A test on the OpenBSD box itself:
Code:
ftp localhost
Trying 127.0.0.1...
Connected to localhost.
220 hercules.utp.xnet FTP server ready.
331 Password required for j65nko.
230- OpenBSD 4.7-current (GENERIC) #31780: Sat Apr  3 16:55:32 MDT 2010
230- 
230- Welcome to OpenBSD: The proactively secure Unix-like operating system.
230- 
230- Please use the sendbug(1) utility to report bugs in the system.
230- Before reporting a bug, please try to reproduce it with the latest
230- version of the code.  With bug reports, please try to ensure that
230- enough information to reproduce the problem is enclosed, and if a
230- known fix for it exists, include that as well.
230- 
230 User j65nko logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> pwd
257 "/home/j65nko" is current directory.
ftp>ls *txt
150 Opening ASCII mode data connection for '/bin/ls'.
-rw-r--r--  1 j65nko  j65nko  2668 May 26  2010 88bde-balance-pl.txt
-rw-r--r--  1 j65nko  j65nko   812 May  5  2010 accounting-database.txt
-rw-r--r--  1 j65nko  j65nko  1424 Dec  6 01:50 external-USB-disk-iomega.txt
-rw-r--r--  1 j65nko  j65nko  1322 May 29  2010 php5-core.pkg-add.txt
-rw-r--r--  1 j65nko  j65nko   351 Apr 21  2010 xslt.txt
226 Transfer complete.
ftp> quit
221 Goodbye.
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump

Last edited by J65nko; 21st December 2010 at 11:22 PM. Reason: Localhost ftp test added
Reply With Quote
Old 21st December 2010
guitarscn guitarscn is offline
Package Pilot
 
Join Date: Oct 2008
Posts: 166
Default

I can use both FileZilla and WinSCP, but I cannot seem to get it working on the network only. I can access the OpenBSD box via external IP address, but not my internal one (192.168.1.51 or whatever). I opened the ports 21 and 22 on the router for my OpenBSD box but the connection still times out. I will try opening the ports for my Windows 7 box as well to see if that will do anything. (The firewall on my Windows 7 is disabled and I haven't installed any AV yet.)

However I can connect to localhost just fine. I am on 192.168.1.51 and I can connect to 192.168.1.51 from it, but I am assuming that's because it just resolves to localhost by default. The Windows computer is 192.168.1.52

Okay I can't open the same ports for a computer on the same network because of confliction...I'm not sure what's wrong. Both FTP and WinSCP are limited to my internet's upload speed and it'll take weeks to copy this stuff over at this rate...

Last edited by guitarscn; 22nd December 2010 at 12:04 AM.
Reply With Quote
Old 22nd December 2010
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,125
Default

How about a simple network/LAN diagram?
Or use a cross-over UTP cable to connect both computers to a very private network.

If both your Windows7 box and the OpenBSD ftp server are on the same wired LAN, the download/upload speed is not limited by your Internet connection at all.
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
Old 22nd December 2010
guitarscn guitarscn is offline
Package Pilot
 
Join Date: Oct 2008
Posts: 166
Default

Code:
[windows 7]----
               |---router---modem---internet
[openbsd]------
I have ports 21 and 22 open for OpenBSD (192.168.1.51), but Windows (192.168.1.52) can't seem to connect to OpenBSD on those ports...the connection times out.

But if I connect to 71.xx.xx.xx (my external public IP) to those ports, it works fine. But the transfer is maxed out by my internet speed.
Reply With Quote
Old 22nd December 2010
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,125
Default

Are the 2 boxes connected through wired or wireless connections to the router?

Can the OpenBSD box ping the Windows7 box? And vice-versa?
For ftp you not only need port 21 open but also the following port range

Code:
$ sysctl -a | grep porthi
net.inet.ip.porthifirst=49152
net.inet.ip.porthilast=65535
Port 21 is used for the ftp commands. The actual transfer is done with ports choosen randomly from the 49152-65535 range. At least for passive ftp
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
Old 22nd December 2010
guitarscn guitarscn is offline
Package Pilot
 
Join Date: Oct 2008
Posts: 166
Default

The Windows box is connected wirelessly.

I guess I also forgot to mention the OpenBSD box is connected to a router bridge via ethernet, and the router is connected to the router-modem wirelessly. But the client bridge shouldn't have to need ports opened, right?

But in any case, even with just 21 opened, I cannot connect at all in the first place so I can't even know if it'll transfer right but I'll open the ports anyway.

I cannot ping either boxes through either boxes. Maybe ping is disabled somewhere but I can ping my external IP just fine.
Reply With Quote
Old 22nd December 2010
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,125
Default

You forgot the outcome of the ping test
Quote:
Can the OpenBSD box ping the Windows7 box? And vice-versa?
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
Old 22nd December 2010
guitarscn guitarscn is offline
Package Pilot
 
Join Date: Oct 2008
Posts: 166
Default

Sorry I just updated my previous post.
Reply With Quote
Old 22nd December 2010
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,125
Default

The simplest way would be to get a cross-over UTP network cable and use that to connect the two boxes in a temporary LAN.

As a benefit the Windows7 box will not use the slow wireless connection.
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
Old 22nd December 2010
guitarscn guitarscn is offline
Package Pilot
 
Join Date: Oct 2008
Posts: 166
Default

Okay I'm just gonna try and connect the 2 computers to the router via ethernet and disconnect everything else and see if I can manage anything. Then I will buy a crossover cable (I might have one already but I can't tell the difference between these cables)

Thanks for all the help!
Reply With Quote
Old 22nd December 2010
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,125
Default

If both the boxes are quite new and thus have Gigabit NICs you even don't need a cross-over cable. You even don't need the router.

For some info about cross-over cables see http://en.wikipedia.org/wiki/Ethernet_crossover_cable
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
Old 22nd December 2010
guitarscn guitarscn is offline
Package Pilot
 
Join Date: Oct 2008
Posts: 166
Default

Well, I just got rid of the bridge and now everything is working perfectly. I only need the bridge for convenience's sake (because OpenBSD doesn't support my wireless card I need to either use a very long ethernet cord for internet or use the bridge) so it's not all that bad.

But these are old machines without the Gigabit things.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PDF files spread Windows worm J65nko News 0 30th April 2010 12:12 PM
Huge FTP transfer file fragmentation problem under Windows eakinasila Other OS 2 13th December 2009 02:50 PM
transfer rate zomo OpenBSD General 7 26th January 2009 03:00 AM
openBSD IPSEC gateway w/WINDOWS XP roadwarrior s2scott OpenBSD Security 7 13th January 2009 11:01 AM
Local transfer is slow. maurobottone OpenBSD General 1 10th January 2009 02:12 PM


All times are GMT. The time now is 09:11 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick