Tag Info

Hot answers tagged

2

Code is something like this ################################################# # clear existing chains ################################################# iptables --flush iptables --delete-chain ################################################# # allow loopback ################################################# iptables -A INPUT -i lo -j ACCEPT iptables -A ...


2

You have different answer because fist scan to 127.0.0.1 is do not go through firewall. Second scan also included firewall rules. Port status Open State An application is actively accepting TCP connections, UDP datagrams or SCTP associations on this port. Finding these is often the primary goal of port scanning. Security-minded people know that each open ...


2

There is currently not a way to show the rules you have entered before enabling the firewall via the CLI command. You can inspect the rules files directly however. /lib/ufw/user*.rules contain the rules controlled via the 'ufw' CLI command. Eg sudo grep '^### tuple' /lib/ufw/user*.rules This will show output like the following sudo grep '^### tuple' ...


1

Add before filter section in /etc/ufw/before.rules(top of file): *nat :PREROUTING ACCEPT [0:0] -A PREROUTING -p tcp --dport 1724 -j REDIRECT --to-port 1723 COMMIT These rules will then need to be reloaded; simply disabling and re-enabling ufw or running ufw reload is not sufficient. The simplest solution is to reboot, otherwise you can use one of the ...


1

You can use apparmor to deny network traffic for some application. First you must install apparmor and apparmor-utils .. sudo apt-get install apparmor* After that you can generate profile to you application ... sudo aa-genprof /usr/bin/google-chrome Next step is to change Networking part in profile to: sudo nano ...


1

Got the log files working. Turns out I was needing to do sport not dport. Works now :D sudo iptables -A INPUT -p udp --sport 27017 -j ACCEPT


1

You can use fallowing command to trace communication between pc and printer sudo tcpdump -i interface | grep ip_address_of_printer You will see output of network communication, protocol, port ... After that you can set ufw Another way is to use command netstat -atu | grep ip_address_of_printer With this command you will see active connection between ...


1

You must be more precise. Generally answer is to enable firewall. Ubuntu buildin firewall is ufw With command sudo ufw enable you will block all inbound traffic. Then you can allow traffic from only one host on port 80 with command sudo ufw allow from ip_address_of_host to any port 80 or allow only port 22 on server from any host sudo ufw allow ...



Only top voted, non community-wiki answers of a minimum length are eligible