Categories
Mastering Development System & Network

CSF failed to Start after Ubuntu 20.04 upgrade from 18.04

Today I have upgraded my Ubuntu 18.04.04 VPS server to Ubuntu 20.04. Now CSF not starting and shows the following error and not start the CSF service. *Error* The path to iptables is either not set or incorrect for IPTABLES [/sbin/ip6tables] in /etc/csf/csf.conf at /usr/local/csf/lib/ConfigServer/URLGet.pm line 26. Compilation failed in require at /usr/sbin/csf line 21. […]

Categories
Linux Mastering Development Ubuntu

CSF failed to Start after Ubuntu 20.04 upgrade from 18.04

Today I have upgraded my Ubuntu 18.04.04 VPS server to Ubuntu 20.04. Now CSF not starting and shows the following error. *Error* The path to iptables is either not set or incorrect for IPTABLES [/sbin/ip6tables] in /etc/csf/csf.conf at /usr/local/csf/lib/ConfigServer/URLGet.pm line 26. Compilation failed in require at /usr/sbin/csf line 21. BEGIN failed–compilation aborted at /usr/sbin/csf line […]

Categories
Linux Mastering Development

UDP packets received on veth, caught by tcpdump, accepted by iptables, but not forwarded to netcat

I have two namespaces srv1 and srv2, interconnected via a softswitch (p4 bmv2) with veth pairs. The softswitch does just simple forwarding. The veth interfaces inside the namespaces have IP addresses assigned to them (respectively 192.168.1.1 and 192.168.1.2). I could ping between the two namespaces using those IP addresses: sudo ip netns exec srv1 ping […]

Categories
Mastering Development System & Network

Restoring default iptable rules after complete wipeout

I am a complete newbie who just accidentally erased all their desktop’s iptable chains and rules and wants to restore them all to the previous default (docker nor bootstraps work now as they cannot program the external connectivity on their endpoints, aparently). Here is what I had: Chain PREROUTING (policy ACCEPT 0 packets, 0 bytes) […]

Categories
Mastering Development System & Network

How to route 0.0.0.0:22 to 192.168.122.179:22?

I want to route 0.0.0.0:22 to 192.168.122.179:22 which is a VM. This way I can access my VM through SSH by typinh the local IP of the host machine. However i get connection refused if I try to ssh from host to vm, or even (obviously) from local machine to host to vm, root@z:/home/lz# iptables […]

Categories
Development Docker

No IPV6 connection from inside docker container

I have ec2 instance in aws with docker container. Problem is I can’t establish IPV6 connection from inside the docker to outside internet. On host machine all works fine. IPV4 also works fine. IP forwarding is enabled for ipv6, there are no drop policies in netfilter configuration, docker is also configured for ipv6 support. See […]

Categories
Development Docker

No IPV6 connection from inside docker container

I have following configuration but there is no ipv6 connection from inside docker container to outside internet. IP forwarding is enabled for ipv6, there are no drop policies in netfilter configuration, docker is also configured for ipv6 support. All works fine with ipv4. Host machine configuration from which I can successfully ping google via ipv6: […]

Categories
Development

blocking ip address per iptables doesn’t work

I wrote a little script to block ip addresses permanently. #!/bin/bash ip=${1:?No IP address given. Exit.} if [[ $ip =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then iptables -A INPUT -s $ip -j DROP iptables-save > /etc/iptables/rules.v4 ip6tables-save > /etc/iptables/rules.v6 else echo “IP address is wrong.” fi I can see the blocked IP address in /etc/iptables/rules.v4. But this IP […]