hi. i have installed a firehol firewall, and i run behind it two servers one is web server (SRV_WEB=<a href="http://192.168.10.55">192.168.10.55</a>) and the other is a mail server(SRV_MAILB=<a href="http://192.168.10.53">
192.168.10.53</a>).<br>i would like to forward all data coming from the port 1433 (Sql server port) to my web server.<br>i did this in my firehol.conf<br><br>iptables -t nat -I PREROUTING -p tcp -d $PUBLIC_MYIP --dport 1433 -j DNAT --to-destination $SRV_WEB
<br>iptables -I FORWARD -p tcp -d $SRV_WEB --dport 1433 -j ACCEPT<br><br>and when i try the NMAP software to dispaly all opened ports i don't have the 1433 ports among the list returned by NMAP.<br><br>someone can tell me what is wrong in my rules.
<br><br>here is my firehol.conf<br><br>server_MSN_ports="tcp/1863"<br>client_MSN_ports="default"<br><br>server_SQL_ports="tcp/1433"<br>client_SQL_ports="default 1433"<br><br>server_YAHOO_ports="tcp/5050"
<br>client_YAHOO_ports="default"<br><br>HOME_MYIP="<a href="http://192.168.10.1">192.168.10.1</a>"<br>HOME_MYIF="eth1"<br>HOME_BCAST="<a href="http://192.168.10.255">192.168.10.255</a>"
<br>HOME_LAN="<a href="http://192.168.10.0/24">192.168.10.0/24</a>"<br>HOME_SERVICES="all"<br><br>PUBLIC_MYIP="<a href="http://81.52.166.74">81.52.166.74</a>"<br>PUBLIC_MYIF="eth0"<br>
PUBLIC_SERVICES="mysql AH ESP isakmp icmp ssh webcache"<br><br>SRV_WEB=<a href="http://192.168.10.55">192.168.10.55</a><br>SRV_VNC=<a href="http://192.168.10.133">192.168.10.133</a><br>SRV_MAIL=<a href="http://192.168.10.50">
192.168.10.50</a><br><br>iptables -t nat -I PREROUTING -p tcp -d <a href="http://81.52.166.74">81.52.166.74</a> --dport http -j DNAT --to-destination $SRV_WEB<br>iptables -I FORWARD -p tcp -d $SRV_WEB --dport http -j ACCEPT
<br><br>iptables -t nat -I PREROUTING -p tcp -d <a href="http://81.52.166.74">81.52.166.74</a> --dport 25 -j DNAT --to-destination $SRV_MAIL<br>iptables -I FORWARD -p tcp -d $SRV_MAIL --dport 25 -j ACCEPT<br>iptables -t nat -I PREROUTING -p udp -d
<a href="http://81.52.166.74">81.52.166.74</a> --dport 25 -j DNAT --to-destination $SRV_MAIL<br>iptables -I FORWARD -p udp -d $SRV_MAIL --dport 25 -j ACCEPT<br><br>iptables -t nat -I PREROUTING -p tcp -d <a href="http://81.52.166.74">
81.52.166.74</a> --dport 110 -j DNAT --to-destination $SRV_MAIL<br>iptables -I FORWARD -p tcp -d $SRV_MAIL --dport 110 -j ACCEPT<br>iptables -t nat -I PREROUTING -p udp -d <a href="http://81.52.166.74">81.52.166.74</a> --dport 110 -j DNAT --to-destination $SRV_MAIL
<br>iptables -I FORWARD -p udp -d $SRV_MAIL --dport 110 -j ACCEPT<br><br>iptables -t nat -I PREROUTING -p tcp -d <a href="http://81.52.166.74">81.52.166.74</a> --dport 5900 -j DNAT --to-destination $SRV_VNC<br>iptables -I FORWARD -p tcp -d $SRV_VNC --dport 5900 -j ACCEPT
<br>iptables -t nat -I PREROUTING -p tcp -d <a href="http://81.52.166.74">81.52.166.74</a> --dport 9100 -j DNAT --to-destination $SRV_VNC<br>iptables -I FORWARD -p tcp -d $SRV_VNC --dport 9100 -j ACCEPT<br> <br>iptables -t nat -I PREROUTING -p tcp -d
<a href="http://81.52.166.74">81.52.166.74</a> --dport 1433 -j DNAT --to-destination $SRV_WEB<br>iptables -I FORWARD -i eth0 -o eth1 -p tcp -d $SRV_WEB --dport 1433 -j ACCEPT<br>iptables -I FORWARD -p tcp -i eth1 -o eth0 -s $SRV_WEB --sport 1433 -j ACCEPT
<br><br>blacklist=""<br>if [ ! -z "${blacklist}" ]<br>then<br> blacklist full "${blacklist}"<br>fi<br><br>iptables -t nat -A PREROUTING -p tcp -s <a href="http://192.168.10.0/24">192.168.10.0/24
</a> --dport 21 -j REDIRECT --to 2121<br>if [ ! -z "${SQUID_PORT}" ]<br><br>then<br> transparent_squid "${SQUID_PORT}" "${SQUID_USERS}" inface "${HOME_MYIF}"<br>#src "${HOME_LAN}"
<br>#`test ! -z "${SQUID_EXCLUDE}" && echo "dst not '${SQUID_EXCLUDE}'"`<br>fi<br><br>if [ ! -z "${PUBLIC_MYIP}" ]<br>then<br> snat to "${PUBLIC_MYIP}" outface "${PUBLIC_MYIF}" src "${HOME_LAN}" dst not "${UNROUTABLE_IPS}"
<br>else<br> masquerade "${PUBLIC_MYIF}"<br>fi<br><br>interface "${HOME_MYIF}" home src "${HOME_LAN}" dst "${HOME_MYIP} ${HOME_BCAST}"<br> policy reject<br> server "${HOME_SERVICES}" accept
<br> client all accept<br><br>interface "${PUBLIC_MYIF}" internet<br> protection strong<br> policy drop<br> if [ ! -z "${TRUSTED_PCS}" -a ! -z "${TRUSTED_SERVICES}" ]
<br> then<br> server "${TRUSTED_SERVICES}" accept src "${TRUSTED_PCS}"<br> fi<br><br> server "${PUBLIC_SERVICES}" accept<br> client all accept<br><br>
router internet2lan inface "${PUBLIC_MYIF}" outface "${HOME_MYIF}"<br>client "dns smtp pop3 imap http ssh icmp SQL" accept src <a href="http://192.168.20.0/24">192.168.20.0/24</a><br>server all accept src
<a href="http://192.168.20.0/24">192.168.20.0/24</a> dst <a href="http://192.168.10.0/24">192.168.10.0/24</a><br> client all accept src "<a href="http://192.168.10.0/24">192.168.10.0/24</a>"<br> server "MSN YAHOO" reject
<br> client "MSN YAHOO" reject<br> client all accept<br><br>