Dynamic ports cannot be protected by port filtering firewalls such as iptables. First, you need to configure NFS services to use fixed ports. Open /etc/sysconfig/nfs, enter:
# vi /etc/sysconfig/nfs
Modify config directive as follows to set TCP/UDP unused ports:
# TCP port rpc.lockd should listen on.
# UDP port rpc.lockd should listen on.
# Port rpc.mountd should listen on.
# Port rquotad should listen on.
# Port rpc.statd should listen on.
# Outgoing port statd should used. The default is port is random
Continue reading “NFS Firewall” »
1:1 NAT maps a single Public IP Address to one of your computer within your local area network (LAN). Unlike port forwarding, 1:1 NAT forwards all ports from one external IP to one internal IP.
iptables -t nat -A POSTROUTING -o eth0 -s 192.168.1.2 -j SNAT --to-source 188.8.131.52 iptables -t nat -A PREROUTING -i eth0 -d 184.108.40.206 -j DNAT --to-destination 192.168.1.2 iptables -A FORWARD -s 220.127.116.11 -j ACCEPT iptables -A FORWARD -d 192.168.1.2 -j ACCEPT
Port forwarding allows remote computers, for example, computers on the Internet, to connect to a specific computer or service within a private local area network (LAN).
Typical applications include the following:
- Running a public HTTP server within a private LAN
- Permitting Secure Shell access to a host on the private LAN from the Internet
- Permitting FTP access to a host on a private LAN from the Internet
In Linux, you can configure port forwarding using iptables command.
The below example is to enable the port forwarding of port 80 of the external ip address “18.104.22.168” to the port 80 of the computer inside the LAN with the ip address of “192.168.1.2”.
iptables -t nat -A PREROUTING -i eth0 -d 22.214.171.124 -p tcp --dport 80 -j DNAT --to-destination 192.168.1.2:80 iptables -A FORWARD -p tcp --dport 80 -j ACCEPT
This article outlines a procedure for installing Tomcat 6 in Debian Lenny. Keep in mind that this does not include Apache 2 installation or integration. Apache must be installed separately and integrated to work with Tomcat.
Add following line in sources list-
deb http://ftp.debian.org/debian/ squeeze non-free
Update and install java
apt-get install sun-java6-jdk sun-java6-jre libtcnative-1
Add the following at the end of the file: Continue reading “Install Tomcat 6 in Debian” »