From: Stephane Ouellette <ouellettes@videotron.ca>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] iptables + pcanywhere
Date: Wed, 16 Oct 2002 16:25:37 +0000 [thread overview]
Message-ID: <marc-lartc-103478559305828@msgid-missing> (raw)
In-Reply-To: <marc-lartc-103475252802679@msgid-missing>
Marco Hainaut wrote:
> hello ,
>
> I'm newbee with iptables and firewalling and my question is :
>
> How can I do to authorise access to a workstation in a local network
> with pcanywhere from the outside trough my "routing-firewalling' red hat
> 8 box newly installed from scratch ?
>
> eth0 = external if ( 212.145.X.X )
> eth1 = local if (192.168.0.2)
> used ports : 5631 (tcp) & 5632 (udp)
>
>
> Is there somebody can help me to write the correct script to make it
> working ?
>
> regards,
>
> Marco Hainaut
>
> _______________________________________________
> LARTC mailing list / LARTC@mailman.ds9a.nl
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
>
Marco,
suppose the IP address of your PC/Anywhere workstation is $PCANY.
Then you need at least the following rules:
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 5631 -j DNAT
--to-destination $PCANY
iptables -t nat -A PREROUTING -i eth0 -p udp --dport 5632 -j DNAT
--to-destination $PCANY
iptables -t filter -A FORWARD -i eth0 -o eth1 -p tcp -m state --dport
5631 --syn --state NEW -j ACCEPT
iptables -t filter -A FORWARD -i eth0 -o eth1 -p udp --dport 5632 -j ACCEPT
iptables -t filter -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
# If you need to nat all outgoing trafic...
iptables -t nat -A POSTROUTING -o eth0 -s 192.168.0.0/24 -j MASQUERADE
Regards,
Stephane.
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
prev parent reply other threads:[~2002-10-16 16:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-16 7:09 [LARTC] iptables + pcanywhere Marco Hainaut
2002-10-16 16:25 ` Stephane Ouellette [this message]
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=marc-lartc-103478559305828@msgid-missing \
--to=ouellettes@videotron.ca \
--cc=lartc@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.