Hi All
I need help with iptables script
I have found this script but i need to tweak a little bit.
The adjustment I need restriction to only certain IP to be able to connect
so lets say Source IP is 87.87.87.7 and port 8000
Internal Destination will be 10.10.10.10 8005
#!/bin/sh
logger "firewall" "Applying nat-start rules"
iptables -N SSHVSBFP -t nat
iptables -A SSHVSBFP -t nat -m recent --set --name SSHVS --rsource
iptables -A SSHVSBFP -t nat -m recent --update --seconds 60 --hitcount 5 --name SSHVS --rsource -j RETURN
iptables -A SSHVSBFP -t nat -p tcp --dport 8005 -m state --state NEW -j DNAT --to-destination 10.10.10.10:8005
iptables -I VSERVER -t nat -i eth0 -p tcp --dport 8005 -m state --state NEW -j SSHVSBFP
I need help with iptables script
I have found this script but i need to tweak a little bit.
The adjustment I need restriction to only certain IP to be able to connect
so lets say Source IP is 87.87.87.7 and port 8000
Internal Destination will be 10.10.10.10 8005
#!/bin/sh
logger "firewall" "Applying nat-start rules"
iptables -N SSHVSBFP -t nat
iptables -A SSHVSBFP -t nat -m recent --set --name SSHVS --rsource
iptables -A SSHVSBFP -t nat -m recent --update --seconds 60 --hitcount 5 --name SSHVS --rsource -j RETURN
iptables -A SSHVSBFP -t nat -p tcp --dport 8005 -m state --state NEW -j DNAT --to-destination 10.10.10.10:8005
iptables -I VSERVER -t nat -i eth0 -p tcp --dport 8005 -m state --state NEW -j SSHVSBFP