New answers tagged iptables
Here is what worked for me for future askers. -A INPUT -s 172.16.10.25/32 -d 172.16.10.40/32 -i eth0 -p tcp --sport 111 -j ACCEPT -A INPUT -s 172.16.10.25/32 -d 172.16.10.40/32 -i eth0 -p tcp --sport 2049 -j ACCEPT -A INPUT -s 172.16.10.25/32 -d 172.16.10.40/32 -i eth0 -p udp --sport 111 -j ACCEPT -A INPUT -s 172.16.10.25/32 -d 172.16.10.40/32 -i eth0 -p ...
Sounds like the below rule should be your fix: iptables -A INPUT -s 192.168.2.0/24 -d 192.168.1.1 -p icmp --icmp-type echo-request -j DROP Anything from source 192.168.2.0/24 with destination 192.168.1.1 with protocol icmp with type echo-request will be DROP'd. Hope this helps.
Having just completed a similar project, I suggest you do the following: install your preferred flavour of Ubuntu open up a terminal sudo apt-get install lamp-server^ sudo apt-get install phpmyadmin create your webpage (I used wordpress), and have apache2 configure it sudo apt-get install dnsmasq edit the /etc/dnsmasq.conf to listen on your IP ...
It causes you going to wrong way when you working with EC2 on AWS, Go to your EC2 console and click on your EC2 security group, in incoming section add HTTP (port 80) and save. You can open HTTP port for specifying IP address or for everyone by IP address 0.0.0.0 After saving your security group, you must have access to your EC2 HTTP port.
Since you have only INPUT rules, which means you only accept incoming traffic from port 69 but you have traffic going out aswell, that means you need to ACCEPT outgoing traffic aswell. sudo iptables -A OUTPUT -p tcp --dport 69 -j ACCEPT sudo iptables -A OUTPUT -p udp --dport 69 -j ACCEPT
This is just one of many possible ways: Put that script file anywhere. For example mine is at /home/doug/init/doug_firewall. Make sure the permissions are correct for execution. For example mine: $ ls -l /home/doug/init/doug_firewall -rwxr-xr-x 1 doug doug 60254 Jul 3 09:52 /home/doug/init/doug_firewall Then edit the /etc/network/intrefaces file to ...
PREROUTING chain only available for nat, mangle and raw tables. iptables assumes filter table, so you must specify one of these, eg. iptables -t nat ...
Because PREROUTING chain belongs to the NAT table, not the FILTER table. If you do not mention any table explicitly by -t option, then FILTER is assumed. So, you need to mention the table type with -t nat: sudo iptables -t nat -A PREROUTING -p tcp --dport 443 -j REDIRECT --to-ports 8443 Note that, MANGLE and RAW tables also have PREROUTING chain but as ...
Rule 1 in chain ufw-before-output has the additional condition of being only for the local interface (lo). The two packets that hit the ufw-user-output chain DROP rule would not have been destined for the local interface. They were also probably new tcp connection syn packets and therefore did not satisfy the RELATED,ESTABLISHED rule.
This is my setup sudo ufw default deny outgoing sudo ufw default deny incoming sudo ufw allow 993 sudo ufw allow 6969 sudo ufw allow out 53 sudo ufw allow out http sudo ufw allow out https sudo ufw allow out 465 sudo ufw allow out 587 sudo ufw allow out 993 sudo ufw allow out 6969 This works well with Ubuntu 16.04: Everything works properly sudo ufw ...
I think iptables would do something for you. First, activate packet forwarding: $ echo 1 > /proc/sys/net/ipv4/ip_forward Redirect your traffic from 18.104.22.168:105 to 10.8.0.105:80 $ iptables -t nat -A PREROUTING -d 22.214.171.124 -p tcp --dport 105 -j DNAT --to-destination 10.8.0.105:80 Make the Iptables marquerade the requisition: $ iptables -t ...
Top 50 recent answers are included