I want to prevent direct access of my Windows Machine and want to expose some programs running on it via my Linux Machine (which again is accessible by a Public IP).
Is there a way where-in I can configure my Linux Machine (say IP = a.b.c.d)
to route all the UDP
traffic which it gets at a specific port (say 6667
) to my Windows Machine (say IP = e.f.g.h
) at port 6668
?
Is yes, how can I implement it?
UPDATE
# bindadress bindport connectaddress connectport
192.168.2.45 6667 192.168.2.104 6668
# logging information
logfile /var/log/rinetd.log
# uncomment the following line if you want web-server style logfile format
logcommon
~
UPDATE
I wish to route UDP
traffic only.
The following section works for TCP only (This was published before Mahendra changed the title
Install rinetd. In this program you can configure incoming port and outgoing port easily. First install the program. Then change /etc/rinetd.conf
Ex:
#bindadress bindport connectaddress connectport
a.b.c.d 6667 e.f.g.h 6668
For UDP check the link below
http://brokestream.com/udp_redirect.html
This is from the chat discussion which actually solved the problem
Yes, this is called reverse NAT and is part of the IpTables capabilities of Linux. Every decent NATtins firewall does that to expose services.