On Fri, Oct 03, 2008 at 02:15:18PM -0400, Douglass Clem wrote: > I've got a box running Ubuntu server 8.04, acting as my network's NAT box. > eth0 is the external interface, and eth1 (192.168.0.1/16) is the internal > interface. I need to forward ports 2253/tcp and 49152/udp on the external > interface to 192.168.0.50 on the internal network. I have been googleing and > reading the iptables man page for the past 30 minutes, and yet iptables > continues to thwart my best efforts. Can anyone help me discover the proper > incantations to ge this to work? Thanks in advance.
/sbin/iptables -t nat -A PREROUTING -i eth0 -p tcp -d ORIG_IP --dport 2253 -j
DNAT --to 192.168.0.50:2253
/sbin/iptables -A FORWARD -i eth0 -o eth1 -p tcp -m state --state NEW --syn -d
192.168.0.50 --dport 2253 -j ACCEPT
/sbin/iptables -t nat -A PREROUTING -i eth0 -p udp -d ORIG_IP --dport 49152 -j
DNAT --to 192.168.0.50:49152
/sbin/iptables -A FORWARD -i ext0 -o eth1 -p udp -m state --state NEW -d
192.168.0.50 --dport 49152 -j ACCEPT
Replace "ORIG_IP" with the ip address configured on your external (ext0)
interface.
John
>
> Douglass Clem
> crashsystems.net
> Public Key: http://crashsystems.net/pubkey.asc
>
> --~--~---------~--~----~------------~-------~--~----~
> You received this message because you are subscribed to the Google Groups
> "NLUG" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to [EMAIL PROTECTED]
> For more options, visit this group at
> http://groups.google.com/group/nlug-talk?hl=en
> -~----------~----~----~----~------~----~------~--~---
>
--
"I'm sorry but our engineers do not have phones."
As stated by a Network Solutions Customer Service representative when asked to
be put through to an engineer.
"My other computer is your windows box."
Ralf Hildebrandt
<sxem> trying to play sturgeon while it's under attack is apparently not fun.
pgpAE5rjw5Dch.pgp
Description: PGP signature
