Walaikum Hello wr wb

On the router box :

modprobe iptable_nat
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward


iptables -t nat -A PREROUTING  -p tcp --dport 5980 -j DNAT --to LAMP.IP:80
iptables -t nat -A PREROUTING  -p tcp --dport 5922 -j DNAT --to LAMP.IP:22


http://router.ip:5980  will show you the LAMP pages.

The router box must have the external IP itself.   If you have a
modem/router  then you can do the forwarding on it then.

Let me know if that works for ya .

Wassalam Alaikum wr wb

Abdallah

ps.  you are still IT ;)




On 7/11/07, Al-Faisal El-Dajani <[EMAIL PROTECTED]> wrote:
>
> Hello guys,
>
> I have two machines at work, one for routing and one acting as a server
> with a lamp installation. The router machine has the usual iptables, dhcp,
> dns,... configuration. Now what i want is to be able to access the server
> from outside the local network.
>
> I tried setting up DNAT rules in iptables, but it seems i'm doing
> something wrong. If anybody can help, it would be really appreciated.
>
> Attached is my iptables configuration script.
>
> --
> Al-Faisal El-Dajani
> Phone: +962-7-77 799 781
> P.O Box: 140056
> 11814 Amman, Jordan
> >
>
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Jolug" group.
 To post to this group, send email to [email protected]
 To unsubscribe from this group, send email to [EMAIL PROTECTED]
 For more options, visit this group at 
http://groups.google.com/group/Jolug?hl=en-GB
-~----------~----~----~----~------~----~------~--~---

رد على