DIGIT-ARC read-only archive · snapshot: July 23, 2026

httpd as FTP server and DSL Sharing

10 posts · originally from https://geek.digit.in/community/threads/httpd-as-ftp-server-and-dsl-sharing.66439/

nileshgr
nileshgr Original post #1
Aug 24, 2007 at 4:38 PM
I have 2 LAN cards on my system. One for DSL and another for LAN (not setup now). I want to share my DSL over LAN. How to do?

Also, for FTP server, i tried proftpd, pure-ftpd. Both failed. I saw an option in SELinux about httpd as FTP server. Please tell me how to make httpd act as an FTP server.


******
Note: LAN and FTP are NOT related to each other.
******
M
Aug 24, 2007 at 5:35 PM
check howtoforge for setting up a ftp server. It should have some nice articles on it, with lots of screenshots.
For sharing your internet over LAN, one way is to use NAT
set up a internal IP like say 192.168.0.1 on eth1 and setup a couple of firewall rules like this.
Code:
iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
and you may have to enable ip forwarding like this
Code:
echo "1" > /proc/sys/net/ipv4/ip_forward
mediator
Aug 24, 2007 at 5:56 PM
From ur avatar, it seems u r on *fedora*! U have 'vsftpd' there! And httpd as ftp server? :confused:

Both are different! http and ftp are completely different!! try vsftpd and google first. I'll check it out later!! Neways why even bother when u can do stuff from ssh? Check it out!
nileshgr
Aug 24, 2007 at 10:30 PM
mediator said:
From ur avatar, it seems u r on *fedora*! U have 'vsftpd' there! And httpd as ftp server? :confused:

Both are different! http and ftp are completely different!! try vsftpd and google first. I'll check it out later!! Neways why even bother when u can do stuff from ssh? Check it out!
Yup! That's right. I have Fedora 7. BTW, how to do it using SSH?
mediator
Aug 25, 2007 at 12:53 AM
Ah sorry its scp actually. Ftp is used for file transfer! When u have ssh daemon installed as an alternative....then, AFAIK scp is installed too with it.

1. U can control the remote machine with ssh. Secure connection!!

Suppose ur account/UID is 'unknown' and home directory as '/home/unknown', then simply execute
Code:
ssh -l uknown <IP_Address_of_your-machine>

2. Next, u want file to be transferred? U use scp for that!!
Suppose u want to tranfer a file 'facts' from my machine 10 from directory '/home/mediator' to ur machine 15 to directory '/home/unknown/files', u simply execute...
Code:
scp 192.0.0.10:/home/mediator/facts 192.0.0.15:/home/unknown/files
Observe the code, its very easy, easier than ftp!! U transfer from source to destination. U can use wildcards too if u wanna copy large number of files!!

So basically one terminal session for controlling the machine, and anotha for transferring. And its all secure. Experience the difference!! :)
M
Aug 25, 2007 at 3:05 AM
One can use sftp rather than scp.
nileshgr
Aug 25, 2007 at 1:23 PM
@mediator, i want FTP for some other purpose. My uncle wanted to send me videos. So he can directly upload videos using FTP! This is my purpose. Understand? He has a Win32 Machine. Lives in Chennai, TN. I live in Pune. :p
mediator
Aug 25, 2007 at 1:40 PM
Doesn't matter! For windows, u have GUI and standalone application like putty called "winscp" and u transfer there just by dragging the file/software/data wateva!! Check it out!!
M
Aug 25, 2007 at 2:51 PM
Why not simply use http instead of ftp? http is much better.
nileshgr
nileshgr #10
Sep 10, 2007 at 5:58 PM
Friends, i solved this using LQ's solution. The LQ guy said that to enable DSL sharing, edit /etc/sysctl.conf and change the directive net.ipv4.ip_forward = 0 to 1. This solved my problem. And FTP server was reconfigured, so now its workin. :) :) This is what @Mehul said but that ip forward method was temporary. This one is permanent.

Anyways, thanks guys. :) ;)