Decommisioned Serial Server Config and notes

From IARC 207 Wiki
Revision as of 12:18, 20 September 2016 by 137.229.92.136 (talk) (Created page with "/etc/network/interfaces <pre> auto lo iface lo inet loopback auto eth0 iface eth0 inet dhcp post-up /home/bob/bin/xmitip.sh #iface eth0 inet static # address 199.165.12...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

/etc/network/interfaces

auto lo
iface lo inet loopback
auto eth0
  iface eth0 inet dhcp
  post-up /home/bob/bin/xmitip.sh

#iface eth0 inet static
#   address 199.165.126.161
#   gateway 199.165.126.129
#   netmask 255.255.255.128
#   dns-nameservers 8.8.8.8 8.8.4.4

/etc/ser2net.conf

# BNZ Radio
6786:raw:25:/root/devices/bnz_radio:57600 8DATABITS NONE 1STOPBIT HANGUP_WHEN_DONE RTSCTS LOCAL
# IARC radio
7808:raw:25:/root/devices/iarc_radio:57600 8DATABITS NONE 1STOPBIT HANGUP_WHEN_DONE RTSCTS LOCAL
# IARC CR10
7809:raw:25:/dev/ttyUSB2:9600 8DATABITS NONE 1STOPBIT HANGUP_WHEN_DONE RTSCTS LOCAL

/etc/iptables.firewall.rules

*filter
:INPUT DROP [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]

# from Jim:
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT



#  Allow all loopback (lo0) traffic and drop all traffic to 127/8 that doesn't use lo0
-A INPUT -i lo -j ACCEPT
-A INPUT -d 127.0.0.0/8 -j REJECT
-A INPUT -s 137.229.94.2 -d 244.0.0.1 -j ACCEPT
#-A INPUT -s 224.0.0.1 -p udp -m udp -j ACCEPT

#  Accept all established inbound connections
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT

#  Allow all outbound traffic - you can modify this to only allow certain traffic
-A OUTPUT -j ACCEPT

#  Allow HTTP and HTTPS connections from anywhere (the normal ports for websites and SSL).
#-A INPUT -p tcp --dport 80 -j ACCEPT
#-A INPUT -p tcp --dport 443 -j ACCEPT

-A INPUT -s 192.168.0.0/16  -p tcp -m tcp --dport 6786 -j ACCEPT
-A INPUT -s 137.229.0.0/16  -p tcp -m tcp --dport 6786 -j ACCEPT
-A INPUT -s 127.0.0.0/8  -p tcp -m tcp --dport 6786 -j ACCEPT
-A INPUT -s 0.0.0.0/0 -p tcp --dport 6786 -j DROP

-A INPUT -s 192.168.0.0/16  -p tcp -m tcp --dport 7808 -j ACCEPT
-A INPUT -s 137.229.0.0/16  -p tcp -m tcp --dport 7808 -j ACCEPT
-A INPUT -s 127.0.0.0/8  -p tcp -m tcp --dport 7808 -j ACCEPT
-A INPUT -s 0.0.0.0/0 -p tcp --dport 7808 -j DROP

-A INPUT -s 137.229.0.0/16  -p tcp -m tcp --dport 7809 -j ACCEPT
-A INPUT -s 192.168.0.0/16  -p tcp -m tcp --dport 7809 -j ACCEPT
-A INPUT -s 127.0.0.0/8  -p tcp -m tcp --dport 7809 -j ACCEPT
-A INPUT -s 0.0.0.0/0 -p tcp --dport 7809 -j DROP


-A INPUT -s 137.229.0.0/16 -p udp -m udp -j ACCEPT

#  Allow SSH connections
#
#  The -dport number should be the same port number you set in sshd_config
#
-A INPUT -p tcp -m state --state NEW --dport 22 -j ACCEPT

#  Allow ping
-A INPUT -p icmp --icmp-type echo-request -j ACCEPT

#  Log iptables denied calls (disabled once I saw what all was getting blocked)
##-A INPUT -m limit --limit 5/min -j LOG --log-prefix "iptables denied: " --log-level 7

#  Drop all other inbound - default deny unless explicitly allowed policy
-A INPUT -j DROP
-A FORWARD -j DROP

COMMIT