Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ipchains basic port forwarding
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
apryan
Tux's lil' helper
Tux's lil' helper


Joined: 31 Jan 2005
Posts: 124

PostPosted: Tue Mar 22, 2005 8:10 am    Post subject: ipchains basic port forwarding Reply with quote

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
View user's profile Send private message
avendesora
Veteran
Veteran


Joined: 16 Aug 2002
Posts: 1739
Location: Betelgeuse vicinity

PostPosted: Tue Mar 22, 2005 8:41 am    Post subject: Reply with quote

Did you read the Home Router Howto?
You might be missing things like telling the kernel that ip forwarding is ok.
Back to top
View user's profile Send private message
apryan
Tux's lil' helper
Tux's lil' helper


Joined: 31 Jan 2005
Posts: 124

PostPosted: Tue Mar 22, 2005 8:42 am    Post subject: Reply with quote

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
View user's profile Send private message
avendesora
Veteran
Veteran


Joined: 16 Aug 2002
Posts: 1739
Location: Betelgeuse vicinity

PostPosted: Tue Mar 22, 2005 9:59 am    Post subject: Reply with quote

Did you notice how none of your trials exactly match what's in the guide?
Back to top
View user's profile Send private message
apryan
Tux's lil' helper
Tux's lil' helper


Joined: 31 Jan 2005
Posts: 124

PostPosted: Tue Mar 22, 2005 6:33 pm    Post subject: Reply with quote

The ones in the guide are all for internal ips. Can anyone give me some pointers here?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum