Linux HAM/Amateur Radio development
 help / color / mirror / Atom feed
* RedHat v7.2 (2.4 Kernel) and Echolink!
@ 2003-01-05 19:26 Bill Walton
  2003-01-06  1:58 ` Wx stations and aprs mvw
  0 siblings, 1 reply; 6+ messages in thread
From: Bill Walton @ 2003-01-05 19:26 UTC (permalink / raw)
  To: LINUX HAMS MAILING LIST

[-- Attachment #1: Type: text/plain, Size: 769 bytes --]

Hello Everyone -

I finally got Echolink working on my LAN system (Windoze98).  I had to 
convert from
"ipchains" to "iptables".  After reviewing numerous "firewall scripts" 
and some help info
from Echolink I was able to piece it all together.  So using what I 
found along with some
additions of my own I have been successful.  Just in case there are 
others who might
contact the list regarding Echolink configuration issues, I am attaching 
my firewall
script to this message.  I am sure that allot of you could have 
accomplished the task
easier and better than I did.  However, mine works and that is good 
enough for me!

I have received some valuable help here on the list and this is just my 
way of trying
to contribute something in return.

73 de Bill KJ6EO

[-- Attachment #2: rc.firewall --]
[-- Type: text/plain, Size: 1917 bytes --]

#!/bin/sh
modprobe ip_tables
#
echo -e "\n\nIPMASQ *TEST* rc.firewall ruleset for kj6eo.com (JAN 2003)\n"
#The location of the iptables program
IPTABLES="/sbin/iptables"
IFCONFIG="/sbin/ifconfig"
GREP="/bin/grep"
AWK="/bin/awk"
SED="/bin/sed"

echo " - Verifying that all kernel modules are ok"
/sbin/depmod -a
/sbin/insmod ip_tables
/sbin/insmod ip_conntrack
/sbin/insmod ip_conntrack_ftp
/sbin/insmod iptable_nat
/sbin/insmod ip_nat_ftp

echo "- Enabling packet forwarding in the kernel"
echo "1" > /proc/sys/net/ipv4/ip_forward

echo "-Resetting the firewall and setting the default FORWARD policy to DROP"
$IPTABLES -P INPUT ACCEPT
$IPTABLES -F INPUT
$IPTABLES -P OUTPUT ACCEPT
$IPTABLES -F OUTPUT
$IPTABLES -P FORWARD DROP
$IPTABLES -F FORWARD

echo "- FWD: Allow all conections OUT and only existing and related ones IN"
$IPTABLES -A FORWARD -i eth0 -o eth1 -m state --state ESTABLISHED,RELATED -j ACCEPT
$IPTABLES -A FORWARD -i eth1 -o eth0 -j ACCEPT
$IPTABLES -A FORWARD -j LOG

echo "- FWD: Allow Echolink tcp 5200 and udp 5198,5199 packets IN"
iptables -A FORWARD -i eth0 -p tcp --dport 5200 -j ACCEPT
iptables -A FORWARD -i eth0 -p udp --dport 5198 -j ACCEPT
iptables -A FORWARD -i eth0 -p udp --dport 5199 -j ACCEPT

echo "- Enabling udp packet forwarding for Echolink"
EXITIF="eth0"		# External (Internet Side)
INTIF="eth1"    	# Internal (LAN Side)

# Determine the external IP automatically
EXITIP="`$IFCONFIG $EXITIF | $GREP 'inet addr' | $AWK '{print $2}' | $SED -e 's/.*://'`"

# Address of LAN Computer Running Echolink
ECHOIP="192.168.1.10"

$IPTABLES -t nat -A PREROUTING -d $EXITIP -p udp --dport 5198 -i $EXITIF -j DNAT --to-destination $ECHOIP
$IPTABLES -t nat -A PREROUTING -d $EXITIP -p udp --dport 5199 -i $EXITIF -j DNAT --to-destination $ECHOIP

echo "- Enabling SNAT (MASQUERADE) funtionality on eth0"
$IPTABLES -t nat -A POSTROUTING -o $EXITIF -j SNAT --to $EXITIP 
echo -e "\nDone.\n"

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-01-06 18:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-05 19:26 RedHat v7.2 (2.4 Kernel) and Echolink! Bill Walton
2003-01-06  1:58 ` Wx stations and aprs mvw
2003-01-06  4:55   ` jbennett
2003-01-06 15:18     ` mvw
2003-01-06  6:22   ` Gérard Parat / F6FGZ
2003-01-06 18:12   ` Curt Mills, WE7U

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox