In an organistaion some times we need to expose some of the internal services to the outer world.If the System Administrator need to access the remote windows machine ,vnc etc .. from the outer network what we will do? Port forwarding is best option to bypass the gateway. Ensure the security setting while forwarding the port address.
Public ip address is configured on the gateway and is set as nat routing. Nat routing help internal users to access the outer world. Internal user request (eg ; http , ftp ,port address)will send to the gateway and from gateway it is send to ‘www’.
Outer world can only access the internal network using the help of System Administrator. He create wise routing rules on the gateway to make access to outer world with out compromising security of the internal network, server, etc.. .
Here i am going explaining the port forwarding using iptable commands, expose an internal windows remote to outside gateway.
The command used to port forward the request from public to internal as follows,
This iptable rule will forward the vncviewer port request from the public ip address to the internal vnc server machine port.
Make sure to give a good secure password to prevent the machine from hacking.
1. Edit the file inside the apf installation directory,
# vi /etc/apf/preroute.rules
Add the same iptables rule into the file and reload the apf. Make changes to the iptables port forwarding rule according to your need.
2. Reload the apf to make the port forwarding rule to make effective.
# apf -r
Latest posts by Melbin Mathew (see all)
- VMware virtual IDE to virtual SCSI hard disk conversion steps – Windows XP - August 6, 2015
- Stop Error “CRITICAL_STRUCTURE_CORRUPTION - August 5, 2015
- Error installing Windows server role and feature required for the Exchange 2010 - December 3, 2013