Results 1 to 4 of 4
  1. #1

    Exclamation vhost in apache not working with iptables

    Hi, heres my problem
    I have 2 boxes running slackware 9.1, one acting as a gateway with iptables, and the other one acting as a web server running apache

    I have 3 vhosts on apache, 2 of them are local IPs, and the third one is listening on port 8443 for my dyndns account

    The 3 of them used to work perfectly until i changed my gateway to iptables (my linksys died on me). I got everything working in iptables (filters and nat). But i cant access my vhost on port 8443 from the outside of my local network (ie, i can access, but cant access <account>

    This vhost worked before i used iptables, and i didnt alter the apache configuration at all. I also have iptables logging every packet it drops, and i dont see anything in the logs that has a destination port of 8443

    i made this rule to forward traffic to the web server box in iptables
    iptables -t nat -A PREROUTING -p tcp --dport 8443 -i eth0 -j DNAT --to

    other prerouting rules works perfectly and are done in the same exact way (with just a different port and DNAT destination)

    i've been searching google for the past 2 hours, and didnt find anything to fix this, all i found were other people with similar problems but without fixes

  2. #2
    Oh yeah, i forgot to say i'm also using masquerade, since my ISP gives me a nice dynamic IP

  3. #3
    Join Date
    Jun 2003
    Run "iptables -L -n -v" (maybe you need to include "-t nat"; it's been forever since I set up a masq box) and watch the counters while trying to access port 8443, so you can see which rule is handling it.

  4. #4
    the rule to DNAT port 8443 have his counter at 0 and it wont change even if i try and access it, thats just weird. The dyndns domain is pointing to the correct IP

    the other DNAT rules have some hundreds of thousands of packets processed, so does the masq rule

Posting Permissions

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