Greetings,
I am using Redhat 7.2 (2.4.7-10) with Iptables
(1.2.3) and I am attempting to forward my http traffic to an internal web
server.
I have successfully setup NAT and MASQUERAD'ing for
the internal network, but I am unable to forward any traffic.
Here is the firewall script I am using (it is not
complete and cheesy, but I am taking baby steps):
--
#!/bin/sh
# ## Script to setup the NAT on a IPTables based firewall # modprobe iptable_nat iptables -F iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE echo 1 > /proc/sys/net/ipv4/ip_forward # Optional modules for NAT modprobe ip_nat_ftp modprobe ip_nat_irc --
The command I have been trying to use with
forwarding the http traffic to the internal web server is
this:
iptables -t nat -A PREROUTING -p tcp --dport
80 -i eth1 -j DNAT --to-destination 10.100.1.250:80
With (as you most likely have guessed) 10.100.1.250
being the IP of my local internal web server, eth0 is internal and eth1 is the
external, I am able to ping the web server from the firewall box and view the
apache served pages from the firewall, but unable to forward any external
traffic.
Thanks for any help or pointers in
advance.
Regards,
Steven
|
- Re: Iptables and DNAT (port forwarding) Steven Hildreth
- Re: Iptables and DNAT (port forwarding) hari_bhr
- Iptables And DNAT (port forwarding) Steven Hildreth