View previous topic :: View next topic |
Author |
Message |
apryan Tux's lil' helper

Joined: 31 Jan 2005 Posts: 124
|
Posted: Tue Mar 22, 2005 8:10 am Post subject: ipchains basic port forwarding |
|
|
Hi,
I am new to ipchains but have used ipfw on freebsd for many years. I'm trying to set up a really basic port forward and having issues. I want to forward incoming connections to 64.71.188.235 port 80 to 66.195.132.169 port 80. I have no other firewall rules yet. 64.71.188.235 has a squiremail login page and 66.195.132.169 has a default apache page. I am adding the firewall rules ON 64.71.188.235.
After searching the forums I have attempted to do the following, each of which did not work and "hung" after issuing a lynx.
iptables -t nat -A PREROUTING -p tcp -d 64.71.188.235 --dport 80 -j DNAT --to-destination 66.195.132.169
iptables -A FORWARD -d 64.71.188.235 -p tcp --dport 80 -j ACCEPT
-nothing returned on lynx 64.71.188.235
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j DNAT --to-destination 66.195.132.169:80
iptables -A FORWARD -d 66.195.132.169 -p tcp --dport 80 -j ACCEPT
-nothing returned on lynx 64.71.188.235
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j DNAT --to-destination 66.195.132.169:80
-nothing returned on lynx 64.71.188.235
What am I doing wrong?!?!
Hope someone can help. |
|
Back to top |
|
 |
avendesora Veteran


Joined: 16 Aug 2002 Posts: 1739 Location: Betelgeuse vicinity
|
Posted: Tue Mar 22, 2005 8:41 am Post subject: |
|
|
Did you read the Home Router Howto?
You might be missing things like telling the kernel that ip forwarding is ok. |
|
Back to top |
|
 |
apryan Tux's lil' helper

Joined: 31 Jan 2005 Posts: 124
|
Posted: Tue Mar 22, 2005 8:42 am Post subject: |
|
|
I knew someone was gonna ask! Yes, I did ensure sysctl has it enabled.
net.ipv4.ip_forward = 1
net.ipv4.conf.default.rp_filter = 1
-anth |
|
Back to top |
|
 |
avendesora Veteran


Joined: 16 Aug 2002 Posts: 1739 Location: Betelgeuse vicinity
|
Posted: Tue Mar 22, 2005 9:59 am Post subject: |
|
|
Did you notice how none of your trials exactly match what's in the guide? |
|
Back to top |
|
 |
apryan Tux's lil' helper

Joined: 31 Jan 2005 Posts: 124
|
Posted: Tue Mar 22, 2005 6:33 pm Post subject: |
|
|
The ones in the guide are all for internal ips. Can anyone give me some pointers here? |
|
Back to top |
|
 |
|