linux-admin.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sasa Ugrenovic <borg@linuks.org>
To: linux-admin@vger.kernel.org
Subject: Re: Port forwarding how ??
Date: 15 Jan 2003 19:24:46 +0100	[thread overview]
Message-ID: <1042655086.899.18.camel@marvin.bl.gozostudios.com> (raw)
In-Reply-To: <3E259D30.7090604@imagelinks.com>

Hmm ..

Not working.

eth0 - 192.168.0.1 - my NAT server,ruter,firewall [this is internal LAN
address]
eth1 - my wireless IP - where the packets should be comming to the 27015
port from the outside(internet).

This server is already configure for NATING,Firewalling,Routing.
So,when i add these rules :

iptables -A PREROUTING -i eth0 -p tcp -m tcp --dport 27015 -j DNAT 
 --to-destination 192.168.0.13:27015
 
 iptables -A POSTROUTING -s 192.168.0.13 -o eth0 -p tcp -m tcp --sport 27015 -j 
 SNAT --to-source 192.168.0.1:27015
 
 iptables -A FORWARD -i eth0 -d 192.168.0.13 --dport 27015 -j ACCEPT
 iptables -A FORWARD -i eth1 --dport 27015 -j ACCEPT
 iptables -A FORWARD -i eth0 -m state --state INVALID,NEW -j DROP

I changed a little, like you didn't add -t nat behind PREROUTING and so
on ...

So, can you now fix these lines above to match my system .. 
Sorry for troubling you, but i don't know where i'm wrong in this issue.

Thanks in advance.


On Wed, 2003-01-15 at 18:41, Jeff Largent wrote:
> assuming:
> 	eth0 = 192.168.0.1
> 	eth1 = 192.168.0.13
> 	and all tables are DENY by default
> 
> iptables -A INPUT -i eth0 -p tcp -d 192.168.0.1 --dport 17015 -j ACCEPT
> iptables -A INPUT -i eth1 -p tcp --dport 17015 -j ACCEPT
> 
> iptables -A PREROUTING -i eth0 -p tcp -m tcp --dport 27015 -j DNAT 
> --to-destination 192.168.0.13:27015
> 
> iptables -A POSTROUTING -s 192.168.0.13 -o eth0 -p tcp -m tcp --sport 27015 -j 
> SNAT --to-source 192.168.0.1:27015
> 
> iptables -A FORWARD -i eth0 -d 192.168.0.13 --dport 27015 -j ACCEPT
> iptables -A FORWARD -i eth1 --dport 27015 -j ACCEPT
> iptables -A FORWARD -i eth0 -m state --state INVALID,NEW -j DROP
> 
> 
> Just a quick throw together but I think should work.
> 
> Sasa Ugrenovic wrote:
> > Hi,sorry for sending mail before this to you Scott.
> > 
> > Let's forget the e-mails that I and you send before this one.
> > 
> > This is what I need to have.
> > 
> > 192.168.0.13 - Server located in LAN ( behind NAT and firewall ). -
> > rh8.0
> > 
> > 192.168.0.1 - NAT,Firewall server. - rh 7.3
> > 
> > I have Counter Strike server located on 192.168.0.13, 27015 port.
> > 
> > Now,no one on the internet can see that server, they can see only NAT
> > server, 192.168.0.1.
> > 
> > Now, i need to, when connecting on nat server 192.168.0.1:27015 UDP to
> > redirect connection to internal 192.168.0.13:27015 server.
> > 
> > My routes are configured correctly ...
> > 
> > 
> > 
> >
> -- 
> Jeff Largent                   ImageLinks, Inc.
> Sr System Admin                Melbourne, Fl 32935
> (321) 253-0011                 fax:(321) 253-5559
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-admin" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 



  reply	other threads:[~2003-01-15 18:24 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-14 23:16 Port forwarding how ?? Sasa Ugrenovic
2003-01-14 23:44 ` Scott Taylor
     [not found]   ` <1042589738.28248.16.camel@marvin.bl.gozostudios.com>
2003-01-15 15:01     ` Scott Taylor
2003-01-15 17:10       ` Jeff Largent
2003-01-15 15:04     ` Scott Taylor
2003-01-15 17:06       ` Sasa Ugrenovic
2003-01-15 17:41         ` Jeff Largent
2003-01-15 18:24           ` Sasa Ugrenovic [this message]
2003-01-15 20:09           ` urgrue
2003-01-15 20:37             ` Sasa Ugrenovic
2003-01-15 20:58               ` urgrue
2003-01-15 21:15                 ` Sasa Ugrenovic
2003-01-15 21:07               ` Scott Taylor
2003-01-15 17:16 ` Jeff Largent

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1042655086.899.18.camel@marvin.bl.gozostudios.com \
    --to=borg@linuks.org \
    --cc=linux-admin@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).