Main > System > Networking >

NAT and blocking all but Port 22 1.0

NAT and blocking all but Port 22 1.0

Sponsored Links

NAT and blocking all but Port 22 1.0 Ranking & Summary

RankingClick at the star to rank
Ranking Level
User Review: 0 (0 times)
File size: MB
Platform: Any Platform
License: GPL (GNU General Public License)
Price:
Downloads: 986
Date added: 2007-02-14
Publisher: Peter Rektorschek

NAT and blocking all but Port 22 1.0 description

NAT and blocking all but Port 22 is a simple iptables firewall script.

Sample:

# Internal and External Devices
dev_world=ppp0
dev_int=eth0

# Firewall IP
addr_int=192.168.1.1

# Internal Net
net_int=192.168.1.0/24

###################################################
# Load Modules
insmod ip_tables
insmod ip_conntrack
insmod ip_conntrack_ftp
insmod ipt_state
insmod iptable_nat
insmod ipt_MASQUERADE

###################################################
# Delete all Rules in Filtertable
iptables -F

###################################################
# Define new chains
iptables -N BLOCK
iptables -N EXT-INT
iptables -N INT-EXT
iptables -N ICMP-DENY
iptables -N INT-IF
iptables -N EXT-IF

###################################################

iptables -A BLOCK -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A BLOCK -m state --state NEW -i ! $dev_world -j ACCEPT
iptables -A BLOCK -j DROP

iptables -A INPUT -j BLOCK
iptables -A FORWARD -j BLOCK

###################################################
# Point to chains
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -i $dev_int -s $net_int -j INT-IF
iptables -A INPUT -d ! $addr_int -i $dev_world -s ! $net_int -j EXT-IF
iptables -A INPUT -j DROP

iptables -A FORWARD -d ! $net_int -i $dev_world -s $net_int -j INT-EXT
iptables -A FORWARD -d $net_int -i $dev_int -s ! $net_int -j EXT-INT
iptables -A FORWARD -j DROP

iptables -A OUTPUT -j ACCEPT

###################################################
# Chain Rules
iptables -A EXT-INT -j DROP

iptables -A EXT-IF -i ! $dev_world -j DROP
iptables -A EXT-IF -p tcp --dport 22 -j ACCEPT
iptables -A EXT-IF -p tcp --dport 5901 -j ACCEPT
iptables -A EXT-IF -p tcp --dport 1024: -j ACCEPT
iptables -A EXT-IF -p udp --dport 1024: -j ACCEPT
iptables -A EXT-IF -j DROP

iptables -A INT-IF -j ACCEPT

###################################################
# NAT Rules
# Standard Routing
iptables -A POSTROUTING -t nat -o $dev_world -j MASQUERADE -s $net_int

# Port Forwarding
#iptables -A PREROUTING -t nat -p tcp -d 192.168.1.1 --dport 5901 --to 192.168.1.2:5901 -j DNAT

##################################################
# Enable IP-Forwarding
echo 1 > /proc/sys/net/ipv4/ip_forward)

NAT and blocking all but Port 22 1.0 Screenshot

Advertisements

NAT and blocking all but Port 22 1.0 Keywords

Bookmark NAT and blocking all but Port 22 1.0

Hyperlink code:
Link for forum:

NAT and blocking all but Port 22 1.0 Copyright

WareSeeker periodically updates pricing and software information of NAT and blocking all but Port 22 1.0 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of NAT and blocking all but Port 22 1.0 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed

Allok Video Splitter 2.2.0 Review:

Name (Required)
Email(Required)
Captcha
Featured Software

Want to place your software product here?
Please contact us for consideration.

Contact WareSeeker.com
Related Software
NAT Monitor is a tool to monitor hosts bandwidth usage in a Linux-NAT network. Free Download
NAT iptables firewall script is an iptables firewall script. Free Download
Arnos IPTABLES firewall script was initially written because I needed to protect my single-homed Linux machine at work. Free Download
Alfandega is a strong and Modular IpTables Firewall. Free Download
IPTables log analizer displays Linux 2.4 iptables logs in a nice HTML page. Free Download
iptables firewall script is an Linux firewall based on the iptables software. Free Download
Basic Ipchains Firewall Rule Script is an iptables firewall script. Free Download
Easy Firewall Generator for IPTables simply generate script for setting iptables. Free Download