Results 1 to 2 of 2

Thread: Simple iptables question

  1. #1

    Simple iptables question

    Hi,
    I have set up a thttpd server on port 81 and I can access it from lan fine, but no matter what I do with my post-firewall script I cannot make it accessible from wan, here is my post-firewall:


    [root@asus root]$ cat ../sbin/post-firewall
    #!/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



    Can anyone comment on what';s wrong here please

  2. #2
    I figured out what was wrong with forwarding - I had DMZ enabled and needed to insert rules, not just append them. But now there is another problem:
    I have 2 routers, one set's the asus in DMZ, so all ports are available to asus. Some PC's are connected to the first router, some to asus. The problem is, that pcs from the other router are able to access my website on the router, but when I try to access it from another host (using ssh and lynx) it fails.

Similar Threads

  1. Problem with simple cron jobs
    By oldudu in forum WL-500g Q&A
    Replies: 27
    Last Post: 10-07-2006, 13:35
  2. Simple clients signal level measuring
    By pekr in forum WL-500g Custom Development
    Replies: 8
    Last Post: 20-12-2005, 05:15
  3. Iptables
    By barsju in forum WL-500g Q&A
    Replies: 15
    Last Post: 01-03-2005, 01:36
  4. Replies: 13
    Last Post: 22-12-2004, 17:27
  5. Simple ICS via PC in XP
    By davidsanton in forum WL-138g [Marvell Chipset]
    Replies: 1
    Last Post: 16-10-2004, 09:10

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •