Folge dem Video um zu sehen, wie unsere Website als Web-App auf dem Startbildschirm installiert werden kann.
Anmerkung: Diese Funktion ist in einigen Browsern möglicherweise nicht verfügbar.
case "$1" in
start)
$0 enablelogging
$0 enablefirewall
;;
stop)
$0 disablefirewall
$0 disablelogging
iptables -F
iptables -X
;;
enablelogging)
echo "Enabling Logging"
ulogd -d
iptables -N logging
iptables -A logging -i ppp0 -m state --state INVALID -j ULOG
iptables -I INPUT 1 -j logging
;;
disablelogging)
echo "Disabling Logging"
iptables -D INPUT -j logging
iptables -F logging
iptables -X logging
killall ulogd
;;
enablefirewall)
echo "Enabling Firewall"
iptables -N firewall
iptables -A firewall -m state --state INVALID -j DROP
iptables -A firewall -i ppp0 -p tcp --dport 80 -j ACCEPT
iptables -A firewall -i ppp0 -p tcp --dport 21 -j ACCEPT
iptables -A firewall -i ppp0 -p tcp --dport 25 -j ACCEPT
iptables -A firewall -j DROP
iptables -A INPUT -j firewall
;;
disablefirewall)
echo "Disabling Firewall"
iptables -D INPUT -j firewall
iptables -F firewall
iptables -X firewall
;;
restart)
$0 stop && $0 start || return=$rc_failed
;;
*)
echo "Usage: $0 {start|stop||restart|enablelogging|disablelogging|enablefirewall|disablefirewall|}"
exit 1
;;
esac
iptables -I INPUT 2 -j vpn
iptables -D INPUT -j vpn
21 ftp File Transfer [Control]
22 ssh SSH Remote Login Protocol
25 smtp Simple Mail Transfer
53 domain Domain Name Server
80 www-http World Wide Web HTTP
110 pop3 Post Office Protocol - Version 3
111 sunrpc SUN Remote Procedure Call
443 https http protocol over TLS/SSL
783 spamd Spamassassin-Daemon
953 rndc BIND remote config
3306 mysql Mysql
iptables -N firewall
iptables -A firewall -m state --state INVALID -j DROP
iptables -A firewall -i eth0 -p tcp --dport 21 -j ACCEPT
iptables -A firewall -i eth0 -p udp --dport 21 -j ACCEPT
iptables -A firewall -i eth0 -p tcp --dport 22 -j ACCEPT
iptables -A firewall -i eth0 -p udp --dport 22 -j ACCEPT
iptables -A firewall -i eth0 -p tcp --dport 25 -j ACCEPT
iptables -A firewall -i eth0 -p udp --dport 25 -j ACCEPT
iptables -A firewall -i eth0 -p tcp --dport 53 -j ACCEPT
iptables -A firewall -i eth0 -p udp --dport 53 -j ACCEPT
iptables -A firewall -i eth0 -p tcp --dport 80 -j ACCEPT
iptables -A firewall -i eth0 -p udp --dport 80 -j ACCEPT
iptables -A firewall -i eth0 -p tcp --dport 110 -j ACCEPT
iptables -A firewall -i eth0 -p udp --dport 110 -j ACCEPT
iptables -A firewall -i eth0 -p tcp --dport 111 -j ACCEPT
iptables -A firewall -i eth0 -p udp --dport 111 -j ACCEPT
iptables -A firewall -i eth0 -p tcp --dport 443 -j ACCEPT
iptables -A firewall -i eth0 -p udp --dport 443 -j ACCEPT
iptables -A firewall -i eth0 -p tcp --dport 783 -j ACCEPT
iptables -A firewall -i eth0 -p tcp --dport 953 -j ACCEPT
iptables -A firewall -i eth0 -p tcp --dport 22222 -j ACCEPT
iptables -A firewall -i lo -j ACCEPT
iptables -A firewall -j DROP
iptables -A INPUT -j firewall
iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
firewall all -- anywhere anywhere
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain firewall (1 references)
target prot opt source destination
DROP all -- anywhere anywhere state INVALID
ACCEPT tcp -- anywhere anywhere tcp dpt:ftp
ACCEPT udp -- anywhere anywhere udp dpt:fsp
ACCEPT tcp -- anywhere anywhere tcp dpt:ssh
ACCEPT udp -- anywhere anywhere udp dpt:ssh
ACCEPT tcp -- anywhere anywhere tcp dpt:smtp
ACCEPT udp -- anywhere anywhere udp dpt:smtp
ACCEPT tcp -- anywhere anywhere tcp dpt:domain
ACCEPT udp -- anywhere anywhere udp dpt:domain
ACCEPT tcp -- anywhere anywhere tcp dpt:http
ACCEPT udp -- anywhere anywhere udp dpt:http
ACCEPT tcp -- anywhere anywhere tcp dpt:pop3
ACCEPT udp -- anywhere anywhere udp dpt:pop3
ACCEPT tcp -- anywhere anywhere tcp dpt:sunrpc
ACCEPT udp -- anywhere anywhere udp dpt:sunrpc
ACCEPT tcp -- anywhere anywhere tcp dpt:https
ACCEPT udp -- anywhere anywhere udp dpt:https
ACCEPT tcp -- anywhere anywhere tcp dpt:783
ACCEPT tcp -- anywhere anywhere tcp dpt:953
ACCEPT tcp -- anywhere anywhere tcp dpt:22222
ACCEPT all -- anywhere anywhere
DROP all -- anywhere anywhere
# iptables -L -v
Chain INPUT (policy ACCEPT 40641 packets, 2093K bytes)
pkts bytes target prot opt in out source destination
5148 1537K firewall all -- any any anywhere anywhere
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 81245 packets, 4243K bytes)
pkts bytes target prot opt in out source destination
Chain firewall (1 references)
pkts bytes target prot opt in out source destination
0 0 DROP all -- any any anywhere anywhere state INVALID
0 0 ACCEPT tcp -- eth0 any anywhere anywhere tcp dpt:ftp
0 0 ACCEPT udp -- eth0 any anywhere anywhere udp dpt:fsp
221 20947 ACCEPT tcp -- eth0 any anywhere anywhere tcp dpt:ssh
0 0 ACCEPT udp -- eth0 any anywhere anywhere udp dpt:ssh
15 624 ACCEPT tcp -- eth0 any anywhere anywhere tcp dpt:smtp
0 0 ACCEPT udp -- eth0 any anywhere anywhere udp dpt:smtp
0 0 ACCEPT tcp -- eth0 any anywhere anywhere tcp dpt:domain
0 0 ACCEPT udp -- eth0 any anywhere anywhere udp dpt:domain
0 0 ACCEPT tcp -- eth0 any anywhere anywhere tcp dpt:http
0 0 ACCEPT udp -- eth0 any anywhere anywhere udp dpt:http
0 0 ACCEPT tcp -- eth0 any anywhere anywhere tcp dpt:pop3
0 0 ACCEPT udp -- eth0 any anywhere anywhere udp dpt:pop3
0 0 ACCEPT tcp -- eth0 any anywhere anywhere tcp dpt:sunrpc
0 0 ACCEPT udp -- eth0 any anywhere anywhere udp dpt:sunrpc
0 0 ACCEPT tcp -- eth0 any anywhere anywhere tcp dpt:https
0 0 ACCEPT udp -- eth0 any anywhere anywhere udp dpt:https
0 0 ACCEPT tcp -- eth0 any anywhere anywhere tcp dpt:783
0 0 ACCEPT tcp -- eth0 any anywhere anywhere tcp dpt:953
0 0 ACCEPT tcp -- eth0 any anywhere anywhere tcp dpt:22222
0 0 ACCEPT all -- lo any anywhere anywhere
4912 1515K DROP all -- any any anywhere anywhere
iptables -A firewall -j DROP
iptables -A firewall -p icmp -j ACCEPT
iptables -A firewall -m state --state RELATED -j ACCEPT
HierWas genau machst Du mit WinSCP3? Hab grad mal auf die Website geguckt und da steht was von wegen Secure File Transfer.