|
tje
|
 |
« on: August 23, 2005, 20:42:08 PM » |
|
I would like to have my own web and FTP server on my WL-500g, but i don't know which combination of tutorials to choose.
Please help me!
Thanks!
|
|
|
|
|
Logged
|
|
|
|
|
|
|
tje
|
 |
« Reply #2 on: August 23, 2005, 22:35:47 PM » |
|
OK, i did it with all three tutorials. Now I have one more problem: what should post-firewall include? I have a lot of text in there and so i can't connect to server via FTP, but HTTP works well
|
|
|
|
« Last Edit: August 23, 2005, 22:39:03 PM by tje »
|
Logged
|
|
|
|
|
macsat
|
 |
« Reply #3 on: August 24, 2005, 06:36:27 AM » |
|
Could you please post your post-firewall here, then I will correct it for you, I think that is the easier way.
|
|
|
|
|
Logged
|
|
|
|
|
tje
|
 |
« Reply #4 on: August 24, 2005, 08:34:13 AM » |
|
you are very kind!
first I did it like tutorial "JustSSHGuide" says and than confused me next tutorial "php-web server" where I was supposed to copy and pase some text in post-firewall, but I didn't know where to pase, so I delete all text out of post-firewall and add new text from last tutorial. I know this was stupid idea but I didn't know where to add copied text, so please help me to compose new post-firewall.
I belive this post-firewall makes problems with my web server, it's unstable and stopped working after i tried to connect via FTP.
My post-firewall in now like this:
#!/bin/sh iptables -D INPUT -j DROP iptables -A INPUT -p tcp --dport 81 -j ACCEPT iptables -A INPUT -p tcp --dport 80 -j ACCEPT iptables -t nat -A PREROUTING -i $1 -p tcp --dport 80 -j DNAT --to-destination $4:81
iptables -A INPUT -j DROP
My lan router's IP is 192.168.1.1 if you need that ip
|
|
|
|
|
Logged
|
|
|
|
|
macsat
|
 |
« Reply #5 on: August 24, 2005, 08:48:52 AM » |
|
Yes, youre post-firewall needs to be something like this to support ssh, web and ftp :
#!/bin/sh iptables -D INPUT -j DROP iptables -A INPUT -p tcp --dport 81 -j ACCEPT iptables -A INPUT -p tcp --dport 80 -j ACCEPT iptables -A INPUT -p tcp --dport 22 -j ACCEPT iptables -A INPUT -p tcp --dport 21 -j ACCEPT
iptables -t nat -A PREROUTING -i $1 -p tcp --dport 80 -j DNAT --to-destination $4:81 iptables -t nat -A PREROUTING -i $1 -p tcp --dport 21 -j DNAT --to-destination $4:21 iptables -t nat -A PREROUTING -i $1 -p tcp --dport 22 -j DNAT --to-destination $4:22
iptables -A INPUT -j DROP
|
|
|
|
|
Logged
|
|
|
|
|
tje
|
 |
« Reply #6 on: August 24, 2005, 09:09:47 AM » |
|
I update post-firewall, do flashfs... reboot, but still i can't acces to FTP server. I am using WS_FTP and CuteFTP to acces to FTP but don't go. Do you have and idea why problems. I did all setting with tutorial and have no problems, but ftp don't work. 
|
|
|
|
|
Logged
|
|
|
|
|
macsat
|
 |
« Reply #7 on: August 24, 2005, 10:17:37 AM » |
|
Are you sure the ftp server is running? What does: ps give you? You could try to install the ftp client called ncftp on your router: ipkg install ncftp And then try to access the router FROM the router, to ensure it IS a firewall problem. ncftp localhost
|
|
|
|
|
Logged
|
|
|
|
|
tje
|
 |
« Reply #8 on: August 24, 2005, 11:04:02 AM » |
|
ps gine me [tjere@(none) root]$ ps PID Uid VmSize Stat Command 1 tjere 392 S /sbin/init 2 tjere SW [keventd] 3 tjere RWN [ksoftirqd_CPU0] 4 tjere SW [kswapd] 5 tjere SW [bdflush] 6 tjere SW [kupdated] 7 tjere SW [mtdblockd] 43 tjere 284 S telnetd 51 tjere 264 S klogd 55 nobody 400 S dnsmasq 56 tjere 312 S syslogd -m 0 -O /tmp/syslog.log -S -l 7 61 tjere SW [khubd] 71 tjere 184 S lpd 73 tjere 188 S p9100d -f /dev/usb/lp0 0 75 tjere 188 S p9101d -f /dev/printers/0 1 78 tjere 232 S waveservermain 80 tjere 232 S rcamdmain 84 tjere SW [usb-storage-0] 85 tjere SW [scsi_eh_0] 89 tjere 356 S pppd file /tmp/ppp/options.wan0 91 tjere 224 S infosvr br0 92 tjere 420 S watchdog 93 tjere 264 S ntp 100 tjere SW [kjournald] 118 tjere 232 S dropbear 155 tjere 404 S httpd eth1 157 tjere 508 S -sh 177 tjere 496 S upnp -D -L br0 -W ppp0 180 tjere 392 R ps
i can't see nothing like FTP so i belive FTP is not installed, am i wrong?
when i type $ncftp localhost Could not connect to 127.0.0.1: Connection refused.
|
|
|
|
« Last Edit: August 24, 2005, 11:10:19 AM by tje »
|
Logged
|
|
|
|
|
macsat
|
 |
« Reply #9 on: August 24, 2005, 11:25:52 AM » |
|
Well...
Did you complete the vsftpd Tutorial?
The build-in stupidftpd server will only work if you have sometning mounted on /tmp/harddrive
|
|
|
|
|
Logged
|
|
|
|
|
tje
|
 |
« Reply #10 on: August 24, 2005, 18:34:55 PM » |
|
i did all tutorials complete, but don't work
i will do all job again
|
|
|
|
|
Logged
|
|
|
|
|