crossover cable LAN connection and mc?
- Rava
- Contributor
- Posts: 5401
- Joined: 11 Jan 2011, 02:46
- Distribution: XFCE 5.01 x86_64 + 4.0 i586
- Location: Forests of Germany
crossover cable LAN connection and mc?
I know that mc has some basic net abilities.
Now my question, connecting two Porteus machines via a crossover cable LAN cable will not work as a connection out of the box.
At least not with Porteus 3.1 on the i586 machine, and 5.0rc1 on the x86-64 able machine.
I wonder, would it be possible to get a crossover cable LAN connection via mc?
In case anyone might wonder what a crossover cable LAN cable is: it looks like your run of the mill LAN cable, but its small cables are connected differently, so that you can connect two machines with each other just by plugging in this special LAN cable without the need of a router.
CAVE! EDIT!
I edited my original post and replaced the incorrect used term with the one ncmprhnsbl told me about below, also edited the title.
Now my question, connecting two Porteus machines via a crossover cable LAN cable will not work as a connection out of the box.
At least not with Porteus 3.1 on the i586 machine, and 5.0rc1 on the x86-64 able machine.
I wonder, would it be possible to get a crossover cable LAN connection via mc?
In case anyone might wonder what a crossover cable LAN cable is: it looks like your run of the mill LAN cable, but its small cables are connected differently, so that you can connect two machines with each other just by plugging in this special LAN cable without the need of a router.
CAVE! EDIT!
I edited my original post and replaced the incorrect used term with the one ncmprhnsbl told me about below, also edited the title.
Cheers!
Yours Rava
Yours Rava
- ncmprhnsbl
- DEV Team
- Posts: 3933
- Joined: 20 Mar 2012, 03:42
- Distribution: v5.0-64bit
- Location: australia
- Contact:
"Null-Modem" LAN connection and mc?
"crossover cable" is the term i think you"re looking for
possible(or not) useful info:Crossover cables look identical to straight-through cables, but have several wire pairs reversed at one end,
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44
- Ed_P
- Contributor
- Posts: 8360
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.01 ISO
- Location: Western NY, USA
"Null-Modem" LAN connection and mc?
Walmart sells a 10' Crossover Cable for $6.45.
If you have a standard piece of cable and some RJ45 plugs you could make your own.
https://www.google.com/search?q=crossov ... =iu&ictx=1
If you have a standard piece of cable and some RJ45 plugs you could make your own.
https://www.google.com/search?q=crossov ... =iu&ictx=1
Ed
- Rava
- Contributor
- Posts: 5401
- Joined: 11 Jan 2011, 02:46
- Distribution: XFCE 5.01 x86_64 + 4.0 i586
- Location: Forests of Germany
crossover cable LAN connection and mc?
Indeed, and thanks for the heads up. I edited my above post accordingly.ncmprhnsbl wrote: ↑22 Jul 2019, 22:34"crossover cable" is the term i think you"re looking forCrossover cables look identical to straight-through cables, but have several wire pairs reversed at one end,
I will check that out and give you the heads up, but not now. We have the witching hour and I need to sleep.
Cheers!
Yours Rava
Yours Rava
- Rava
- Contributor
- Posts: 5401
- Joined: 11 Jan 2011, 02:46
- Distribution: XFCE 5.01 x86_64 + 4.0 i586
- Location: Forests of Germany
crossover cable LAN connection and mc?
Since the configuration like in https://superuser.com/questions/279543/ ... ross-cable about "I connected two Fedora machines. Here, I used A and B as the machine names" does not work in Slackware / Porteus, I tried doing it like the original question, but only added one route to the other machine and not one back.
This is on PC 1 - the one running Porteus 5.1rc1 x86-64:
Then I switched to PC 2 - the one running i586 Porteus 3.1:
After the ping worked on PC 2 I again did ping on PC 1 once again:
You can see, for a short time a connection - at least via ping - is available, but that breaks down after a short time.
Any ideas why that is?
I presume to have a stable connection and be able to send files via LAN cross cable - I would at least have to install a minimal ftp server on one of the Porteus machines?
When I want to send files in both directions, would I need to install a ftp server on both machines?
This is on PC 1 - the one running Porteus 5.1rc1 x86-64:
Code: Select all
root@porteus:~# ifconfig eth0 10.10.11.16 netmask 255.255.255.0 up
root@porteus:~# route add default gw 10.10.11.13 eth0
root@porteus:~# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 10.10.11.13 0.0.0.0 UG 0 0 0 eth0
10.10.11.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
loopback 0.0.0.0 255.0.0.0 U 0 0 0 lo
root@porteus:~# ping 10.10.11.13
PING 10.10.11.13 (10.10.11.13) 56(84) bytes of data.
From 10.10.11.16 icmp_seq=1 Destination Host Unreachable
From 10.10.11.16 icmp_seq=2 Destination Host Unreachable
From 10.10.11.16 icmp_seq=3 Destination Host Unreachable
^C
--- 10.10.11.13 ping statistics ---
5 packets transmitted, 0 received, +3 errors, 100% packet loss, time 4078ms
pipe 4
root@porteus:~#
Code: Select all
guest@porteus:~$ su -
Password:
root@porteus:~# ifconfig eth0 10.10.11.13 netmask 255.255.255.0 up
root@porteus:~# ping 10.10.11.16
connect: Network is unreachable
root@porteus:~# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
loopback * 255.0.0.0 U 0 0 0 lo
root@porteus:~# ifconfig eth0 10.10.11.13 netmask 255.255.255.0 up
root@porteus:~# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.10.11.0 * 255.255.255.0 U 0 0 0 eth0
loopback * 255.0.0.0 U 0 0 0 lo
root@porteus:~# ping 10.10.11.13
PING 10.10.11.13 (10.10.11.13) 56(84) bytes of data.
64 bytes from 10.10.11.13: icmp_seq=1 ttl=64 time=0.058 ms
64 bytes from 10.10.11.13: icmp_seq=2 ttl=64 time=0.067 ms
64 bytes from 10.10.11.13: icmp_seq=3 ttl=64 time=0.066 ms
64 bytes from 10.10.11.13: icmp_seq=4 ttl=64 time=0.064 ms
^C
--- 10.10.11.13 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3000ms
rtt min/avg/max/mdev = 0.058/0.063/0.067/0.010 ms
root@porteus:~# ping 10.10.11.13
connect: Network is unreachable
root@porteus:~# ifconfig eth0 10.10.11.13 netmask 255.255.255.0 up
root@porteus:~# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.10.11.0 * 255.255.255.0 U 0 0 0 eth0
loopback * 255.0.0.0 U 0 0 0 lo
root@porteus:~# ifconfig eth0 10.10.11.13 netmask 255.255.255.0 up
root@porteus:~# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.10.11.0 * 255.255.255.0 U 0 0 0 eth0
loopback * 255.0.0.0 U 0 0 0 lo
root@porteus:~# ping 10.10.11.13
PING 10.10.11.13 (10.10.11.13) 56(84) bytes of data.
64 bytes from 10.10.11.13: icmp_seq=1 ttl=64 time=0.051 ms
64 bytes from 10.10.11.13: icmp_seq=2 ttl=64 time=0.069 ms
64 bytes from 10.10.11.13: icmp_seq=3 ttl=64 time=0.062 ms
^C
--- 10.10.11.13 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1999ms
rtt min/avg/max/mdev = 0.051/0.060/0.069/0.011 ms
root@porteus:~# ping 10.10.11.13
connect: Network is unreachable
root@porteus:~#
Code: Select all
root@porteus:~# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 10.10.11.13 0.0.0.0 UG 0 0 0 eth0
10.10.11.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
loopback 0.0.0.0 255.0.0.0 U 0 0 0 lo
root@porteus:~# ping 10.10.11.13
PING 10.10.11.13 (10.10.11.13) 56(84) bytes of data.
64 bytes from 10.10.11.13: icmp_seq=1 ttl=64 time=0.621 ms
64 bytes from 10.10.11.13: icmp_seq=2 ttl=64 time=0.361 ms
64 bytes from 10.10.11.13: icmp_seq=3 ttl=64 time=0.322 ms
64 bytes from 10.10.11.13: icmp_seq=4 ttl=64 time=0.299 ms
64 bytes from 10.10.11.13: icmp_seq=5 ttl=64 time=0.268 ms
64 bytes from 10.10.11.13: icmp_seq=6 ttl=64 time=0.235 ms
64 bytes from 10.10.11.13: icmp_seq=7 ttl=64 time=0.353 ms
64 bytes from 10.10.11.13: icmp_seq=8 ttl=64 time=0.333 ms
64 bytes from 10.10.11.13: icmp_seq=9 ttl=64 time=0.339 ms
64 bytes from 10.10.11.13: icmp_seq=10 ttl=64 time=0.329 ms
64 bytes from 10.10.11.13: icmp_seq=11 ttl=64 time=0.400 ms
64 bytes from 10.10.11.13: icmp_seq=12 ttl=64 time=0.352 ms
^C
--- 10.10.11.13 ping statistics ---
12 packets transmitted, 12 received, 0% packet loss, time 11299ms
rtt min/avg/max/mdev = 0.235/0.351/0.621/0.091 ms
root@porteus:~# ping 10.10.11.13
PING 10.10.11.13 (10.10.11.13) 56(84) bytes of data.
^C
--- 10.10.11.13 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2088ms
Any ideas why that is?
I presume to have a stable connection and be able to send files via LAN cross cable - I would at least have to install a minimal ftp server on one of the Porteus machines?
When I want to send files in both directions, would I need to install a ftp server on both machines?
Cheers!
Yours Rava
Yours Rava
- Blaze
- DEV Team
- Posts: 3884
- Joined: 28 Dec 2010, 11:31
- Distribution: ⟰ Porteus current ☯ all DEs ☯
- Location: ☭ Russian Federation, Lipetsk region, Dankov
- Contact:
crossover cable LAN connection and mc?
Rava, simple way is share your stuff via samba - look at this topic Установка и настройка Samba - общий доступ к сетевым дискам
If you want to use FTP-server look at Установка и настройка FTP-сервера VSFTPD в Porteus or Установка и настройка FTP-сервера ProFTPD в Porteus
At my job I use samba for the local connection and VSFTPD for the global connection via canonical domain from provider.
If you want to use FTP-server look at Установка и настройка FTP-сервера VSFTPD в Porteus or Установка и настройка FTP-сервера ProFTPD в Porteus
At my job I use samba for the local connection and VSFTPD for the global connection via canonical domain from provider.
Linux 6.6.11-porteus #1 SMP PREEMPT_DYNAMIC Sun Jan 14 12:07:37 MSK 2024 x86_64 Intel(R) Xeon(R) CPU E3-1270 v6 @ 3.80GHz GenuineIntel GNU/Linux
MS-7A12 » [AMD/ATI] Navi 23 [Radeon RX 6600] [1002:73ff] (rev c7) » Vengeance LPX 16GB DDR4 K2 3200MHz C16
MS-7A12 » [AMD/ATI] Navi 23 [Radeon RX 6600] [1002:73ff] (rev c7) » Vengeance LPX 16GB DDR4 K2 3200MHz C16
- Rava
- Contributor
- Posts: 5401
- Joined: 11 Jan 2011, 02:46
- Distribution: XFCE 5.01 x86_64 + 4.0 i586
- Location: Forests of Germany
crossover cable LAN connection and mc?
So, your module vsftpd-3.0.3-x86_64-5.xzm would work for Port 5.0rc1?Blaze wrote: ↑27 Jul 2019, 08:28If you want to use FTP-server look at Установка и настройка FTP-сервера VSFTPD в Porteus
It said in your post "(для Porteus 4.0+)", I presume that means "for Porteus 4.0+"
I think I try out VSFTPD - 64kB only, I am sure Samba would be much larger than that. And Samba is mainly WitlessOS sharing, and I have no interest in that. Linux only sharing is all I need.
Would I need to run VSFTPD on both machines? (Sadly, I still cannot read Russian.)
Therefore I looked up other resources, like https://help.ubuntu.com/community/vsftpd
Seems that page is outdated when it comes to the most recent version:
but seems informative nonetheless.The latest vsftpd release is v3.0.2, currently at https://security.appspot.com/downloads/ ... 0.2.tar.gz
BUT the site fails to tell us which file needs to be edited.
E.g. it states
That is all peachy, but where to put these lines?To disable anonymous login and to enable local users login and give them write permissions:
Code:
# No anonymous login
anonymous_enable=NO
# Let local users login
# If you connect from the internet with local users, you should enable TLS/SSL/FTPS
local_enable=YES
# Write permissions
write_enable=YES
Cheers!
Yours Rava
Yours Rava
- Blaze
- DEV Team
- Posts: 3884
- Joined: 28 Dec 2010, 11:31
- Distribution: ⟰ Porteus current ☯ all DEs ☯
- Location: ☭ Russian Federation, Lipetsk region, Dankov
- Contact:
crossover cable LAN connection and mc?
of course. Porteus 4.0+ is mean Porteus 5.0
Samba is included to core of Porteus =)
no. Only at one PC (as server).
Another machines - as clients. For connetion to FTP server you can use gFTP client for example.
Rava, I have done all settings in vsftpd-3.0.3-x86_64-5.xzm
but you are need to set these parameters
Code: Select all
# Enable passive mode for vsftpd server
# Specify port range for passive mode
pasv_enable=Yes
pasv_max_port=<max>
pasv_min_port=<min>
# Set to YES if you want to use the host name (as opposed to the IP address) in the pasv_address option
pasv_addr_resolve=NO
pasv_address=<your ip>
Code: Select all
# Note. You can use different path instead /home/ftp and different user name
useradd -d /home/ftp -m -g users -s /dev/null ftpuser
passwd ftpuser
chmod -R 775 /home/ftp
chown -R ftpuser:users /home/ftp
echo 'ftpuser' > /etc/vsftpd.allow_list
echo -e "if [ -x /usr/sbin/vsftpd ]; then\\n echo \"Starting vsftpd: /usr/sbin/vsftpd\" && sleep 5 && /usr/sbin/vsftpd &\\nfi" >> /etc/rc.d/rc.local
reboot
On client machine run gFTP and type
- ip of your FTP server
- port - type 21 in this field
- user name
- password
Linux 6.6.11-porteus #1 SMP PREEMPT_DYNAMIC Sun Jan 14 12:07:37 MSK 2024 x86_64 Intel(R) Xeon(R) CPU E3-1270 v6 @ 3.80GHz GenuineIntel GNU/Linux
MS-7A12 » [AMD/ATI] Navi 23 [Radeon RX 6600] [1002:73ff] (rev c7) » Vengeance LPX 16GB DDR4 K2 3200MHz C16
MS-7A12 » [AMD/ATI] Navi 23 [Radeon RX 6600] [1002:73ff] (rev c7) » Vengeance LPX 16GB DDR4 K2 3200MHz C16
- Rava
- Contributor
- Posts: 5401
- Joined: 11 Jan 2011, 02:46
- Distribution: XFCE 5.01 x86_64 + 4.0 i586
- Location: Forests of Germany
crossover cable LAN connection and mc?
Okay, since ftp should be able to handle both uploads and downloads, it should be possible to upload stuff from any of the PCs, and also possible to download stuff to any, right?
I presume these should be set in /etc/vsftpd.conf ?Blaze wrote: ↑27 Jul 2019, 20:18Rava, I have done all settings in vsftpd-3.0.3-x86_64-5.xzm
but you are need to set these parametersCode: Select all
# Enable passive mode for vsftpd server # Specify port range for passive mode pasv_enable=Yes pasv_max_port=<max> pasv_min_port=<min> # Set to YES if you want to use the host name (as opposed to the IP address) in the pasv_address option pasv_addr_resolve=NO pasv_address=<your ip>
And since I run my systems without any save container (I prefer manual savings to $PORTDIR/rootcopy ) I presume I need to copy /etc/vsftpd.conf to $PORTDIR/rootcopy/etc also prior reboot.
And also the changes done by the other commands, like what useradd and passwd did.
Or, as added security, create a new local version of the vsftpd module including these changes, with the changed /home/ftp folder and also including changed /etc/shadow /etc/passwd /etc/vsftpd.conf /etc/vsftpd.allow_list and /etc/rc.d/rc.local .
Am I missing crucial files or folders here?
You put Russian comments into /etc/vsftpd.conf of the vsftpd-3.0.3-x86_64-5.xzm module.
I downloaded the original vsftpd-3.0.3-x86_64-5.txz to get the man pages and looked up the info.
The translation to these:
Code: Select all
# Эта опция имеет эффект только для не-PAM сборок vsftpd.
# Если выключена, то vsftpd не будет проверять оболочку локального пользователя в /etc/she
lls
check_shell=NO
# Директива, разрешающая список пользователей которым нужно открыть доступ к FTP, и путь до этого списка соответственно.
userlist_enable=YES
userlist_file=/etc/vsftpd.allow_list
# Директива, запрещающая список пользователей, которым закрыт доступ к FTP,
# в нашем случае запрещен вход всех пользователей кроме тех что указаны в /etc/vsftpd.allow_list
userlist_deny=NO
Code: Select all
# Note! This option only has an effect for non-PAM builds of vsftpd.
# If disabled, vsftpd will not check /etc/shells for a valid user shell
# for local logins. Default: YES
check_shell=NO
# If enabled, vsftpd will load a list of usernames, from the filename
# given by userlist_file. If a user tries to log in using a name in
# this file, they will be denied before they are asked for a pass‐
# word. This may be useful in preventing cleartext passwords being
# transmitted. See also userlist_deny. Default: NO
userlist_enable=YES
userlist_file=/etc/vsftpd.allow_list
# This option is examined if userlist_enable is activated. If you set
# this setting to NO, then users will be denied login unless they are
# explicitly listed in the file specified by userlist_file. When lo‐
# gin is denied, the denial is issued before the user is asked for a
# password. Default: YES
userlist_deny=NO
Code: Select all
#«запирать» локальных пользователей в домашнем каталоге
chroot_local_user=YES
# разрешаем использовать домашние каталоги с правом на запись
allow_writeable_chroot=YES
When starting gftp it gives these warnings:
Code: Select all
$ gftp
gFTP Warning: Skipping line 248 in config file: entropy_source
gFTP Warning: Skipping line 251 in config file: entropy_len
gFTP Warning: Skipping line 254 in config file: verify_ssl_peer
Not having ssl is probably a bad idea, and usually entropy here is used for more security.
Cheers!
Yours Rava
Yours Rava
- Blaze
- DEV Team
- Posts: 3884
- Joined: 28 Dec 2010, 11:31
- Distribution: ⟰ Porteus current ☯ all DEs ☯
- Location: ☭ Russian Federation, Lipetsk region, Dankov
- Contact:
crossover cable LAN connection and mc?
Yes.
Yep.
Seems all files and folders are here, but I Porteus use with save changes.
Code: Select all
# This rule assigns virtual root to the global users, that connects from Internet (via external ip or domain).
# so that users do not have access to move beyond their virtual root (directory)
chroot_local_user=YES
# Able to be writable to the chroot environment
allow_writeable_chroot=YES
I don't have these warnings in terminal. In gFTP
Code: Select all
Searh mydomain.ru
Attempt mydomain.ru:21
Connect to mydomain.ru:21
220 (vsFTPd 3.0.3)
USER myuser
331 Please specify the password.
PASS xxxx
230 Login successful.
SYST
215 UNIX Type: L8
TYPE I
200 Switching to Binary mode.
Pwd
257 "/" is the current directory
Downloading the list of directory files from the server (LC_TIME = ru_RU.utf8)
PASV
227 Entering Passive Mode (XXX,XXX,XXX,XX,39,108).
LIST -aL
150 Here comes the directory listing.
226 Directory send OK.
Linux 6.6.11-porteus #1 SMP PREEMPT_DYNAMIC Sun Jan 14 12:07:37 MSK 2024 x86_64 Intel(R) Xeon(R) CPU E3-1270 v6 @ 3.80GHz GenuineIntel GNU/Linux
MS-7A12 » [AMD/ATI] Navi 23 [Radeon RX 6600] [1002:73ff] (rev c7) » Vengeance LPX 16GB DDR4 K2 3200MHz C16
MS-7A12 » [AMD/ATI] Navi 23 [Radeon RX 6600] [1002:73ff] (rev c7) » Vengeance LPX 16GB DDR4 K2 3200MHz C16
- Rava
- Contributor
- Posts: 5401
- Joined: 11 Jan 2011, 02:46
- Distribution: XFCE 5.01 x86_64 + 4.0 i586
- Location: Forests of Germany
crossover cable LAN connection and mc?
Thanks, updated my localized module.Blaze wrote: ↑28 Jul 2019, 14:32Code: Select all
# This rule assigns virtual root to the global users, that connects from Internet (via external ip or domain). # so that users do not have access to move beyond their virtual root (directory) chroot_local_user=YES # Able to be writable to the chroot environment allow_writeable_chroot=YES
Cheers!
Yours Rava
Yours Rava