help with DNAT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Newbie warning!

My box is doing everything I need (SNAT, DHCP & Squid proxy, etc) EXCEPT
DNAT!  

I don't think the problem is syntax or filters (I have filtering "turned
off" right now to try to troubleshoot the problem - see script)

Appreciate help.

Thanks,
Bill

INET_IP="(public IP)"
INET_IFACE="eth0"
INET_BROADCAST="(public)"

LAN_IP="192.168.0.254"
LAN_IP_RANGE="192.168.0.0/24"
LAN_BROADCAST_ADDRESS="192.168.0.255"
LAN_IFACE="eth1"

LO_IFACE="lo"
LO_IP="127.0.0.1"

IPTABLES="/sbin/iptables"
/sbin/depmod -a
/sbin/modprobe ip_tables
/sbin/modprobe ip_conntrack
/sbin/modprobe iptable_filter
/sbin/modprobe iptable_mangle
/sbin/modprobe iptable_nat
/sbin/modprobe ipt_LOG
/sbin/modprobe ipt_limit
/sbin/modprobe ipt_state
echo "1" > /proc/sys/net/ipv4/ip_forward
$IPTABLES -F
$IPTABLES -t nat -F
$IPTABLES -t mangle -F
#

$IPTABLES -X
$IPTABLES -t nat -X
$IPTABLES -t mangle -X


$IPTABLES -P INPUT ACCEPT
$IPTABLES -P OUTPUT ACCEPT
$IPTABLES -P FORWARD ACCEPT

$IPTABLES -t nat -A POSTROUTING -o $INET_IFACE -j SNAT --to-source
$INET_IP
$IPTABLES -t nat -A PREROUTING -p tcp -i eth0 --dport 80 -j DNAT
--to-destination 192.168.0.105:80
######################################################################
Attention: 
This e-mail message is privileged and confidential. If you are not the 
intended recipient please delete the message and notify the sender. 
Any views or opinions presented are solely those of the author.

This e-mail has been scanned for viruses and cleared by MailMarshal
software @ rocketinternet.net
######################################################################



[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux