Re: Iptables rule to access machine behind the gateway ...
Sameer Verma <[email protected]>
| Newsgroups | gmane.network.nocat |
|---|---|
| Message-ID | <[email protected]> |
Scott C. Lemon wrote: >Thank you ... I am going to test this today. I'm also going to look which >file this makes the most sense to add to ... I'm guessing the initialize.fw? > > > > add it to the end of initialize.fw I usually put the rule(s) in a separate file and call it from initialize.fw Make sure the new rule file is chmod +x Sameer >Scott C. Lemon > > > > >-----Original Message----- >From: [email protected] [mailto:[email protected]] >On Behalf Of Sameer Verma >Sent: Monday, October 18, 2004 10:55 AM >To: Scott C. Lemon >Cc: [email protected] >Subject: Re: [NoCat] Iptables rule to access machine behind the gateway ... > > >Scott C. Lemon wrote: > > > >>I know that I saw this addressed before, however I can not find the >>solution in the archives ... I've been searching for a while ... >> >>I want to add a rule to iptables that will allow me to access a >>machine, that is behind the nocat gateway, from the Internet. >> >>In our various locations, we have both access points and some >>computers that are on the "internal" network. Often, I want to be >>able to access these using either VNC or a Web Browser from out on the >>Internet. >> >>How can I define a rule that maps a port on the "external" network >>side, to a address:port on the "internal" side? I have not yet >>figured out the proper iptables syntax to do this ... >> >>Thanks! >> >> >>Scott C. Lemon >> >> > > >Scott, >Something like this should give you unfettered access from the outside >to a service running internally. This example is to do Remote Desktop on >Windows (port 3389). > >iptables -t nat -A PREROUTING -p tcp --dport 3389 -j DNAT >--to-destination 192.168.89.10:3389 > >Run this after running Nocat. > >Hope this helps. > >Sameer > > >