1 2 3 4 5 6 7 8
#!/bin/ash # Close from outside iptables -A INPUT -i br0 -p tcp --dport 515 -j DROP iptables -A INPUT -i br0 -p tcp --dport 5515 -j DROP # Redirect from VM to lpd iptables -t nat -A PREROUTING -s 192.168.0.0/16 -p tcp --dport 515 -j REDIRECT --to-port 5515