PDA

Bekijk de volledige versie : Services not available from WAN



spooky0815
28-12-2005, 18:17
Hello,

In the last days I read a lot of threads about problems of the WAN port.
I configure my SSH and my webserver with the tutorials of Macsat. In my LAN everything works very well. But from WAN is no service available on port 22, 80, 81. There are no virtual servers or port triggers.

my post-boot:

#!/bin/sh
dropbear

mount /dev/discs/disc0/part1 /opt
i=0
while [ $i -le 30 ]
do
if [ -d /opt/etc ]
then
break
fi
sleep 1
i=`expr $i + 1`
done

# swap
swapon /dev/discs/disc0/part2

# Run all active services - active means starts with S
/opt/etc/init.d/rc.unslung

# OpenVPN
mkdir -p /dev/net
mknod /dev/net/tun c 10 200
insmod /opt/drivers/tun.o

# Midnight Commander
echo "export TERMINFO=/opt/share/terminfo">>/etc/profile
echo "alias mc=\"mc -c\"">>/etc/profile



my post-firewall:

#!/bin/sh
iptables -D INPUT -j DROP
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
iptables -A INPUT -p tcp --dport 81 -j ACCEPT
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
iptables -t nat -A PREROUTING -i vlan1 -p tcp --dport 80 -j DNAT --to-destination $4:81
iptables -t nat -A PREROUTING -i vlan1 -p tcp --dport 22 -j DNAT --to-destination $4:22
iptables -A INPUT -j DROP


...in the thread http://wl500g.info/showthread.php?t=2128&highlight=tun.o

he has the same problems and he copy the post-firewall script into /opt/etc/init.d/S99firewall

I also tried it without success :(

Can someone give my a little how-to to configure the WAN access...

Sorry for the bad english and thank you :)) .

spooky

kokoro
10-01-2006, 18:55
Did someone answer ?

:confused:

max2950
10-01-2006, 21:25
But my problem seems very similar to yours.....:(

http://wl500g.info/showthread.php?t=4123

jonolumb
12-01-2006, 18:07
i answered then realised the settings I had quoted (for iptables) were the same as yours!
So I deleted my post

Post Firewall can be installed and run from /usr/local/sbin/post-firewall
See this guide on my Wiki:
http://www.sprayfly.com/wiki/SSH_Guide
Sorry
Jono