fickit: Fix IP and ifaces
This commit is contained in:
parent
59de4f66d8
commit
2ce95ccafc
2 changed files with 13 additions and 12 deletions
|
|
@ -48,17 +48,17 @@ onboot:
|
|||
net: /run/netns/nginx
|
||||
- name: frontal-ip-setup # without bonding
|
||||
image: linuxkit/ip:6cc44dd4e18ddb02de01bc4b34b5799971b6a7bf
|
||||
command: ["/bin/sh", "-c", "ip link set eth1 up; ip a add 172.23.42.1/24 dev eth1; ip a add 172.23.42.254/24 dev eth1; ip a add 91.243.117.240/32 dev eth1; ip link add link eth1 name internet type vlan id 2; ip link set internet up;" ]
|
||||
command: ["/bin/sh", "-c", "ip link set name bond-frontal eth3; ip link set bond-frontal up; ip a add 192.168.50.10/24 dev bond-frontal; ip a add 91.243.117.240/32 dev bond-frontal; ip link add link bond-frontal name internet type vlan id 4; ip link set internet up;" ]
|
||||
net: /run/netns/nginx
|
||||
runtime:
|
||||
interfaces:
|
||||
- name: eth1
|
||||
# - name: eth1
|
||||
# - name: eth2
|
||||
# - name: eth3
|
||||
- name: eth3
|
||||
# - name: eth4
|
||||
# - name: frontal-ip-setup # with bonding
|
||||
# image: linuxkit/ip:6cc44dd4e18ddb02de01bc4b34b5799971b6a7bf
|
||||
# command: ["/bin/sh", "-c", "ip link set dev bond-frontal type bond mode balance-alb; ip link set bond-frontal up; ifenslave bond-frontal eth1 eth2 eth3 eth4; ip a add 172.23.42.254/24 dev bond-frontal; ip a add 172.23.42.1/24 dev bond-frontal; ip a add 91.243.117.240/32 dev bond-frontal; ip link add link bond-frontal name internet type vlan id 2; ip link set internet up; sysctl -w net.ipv4.ip_forward=1;" ]
|
||||
# command: ["/bin/sh", "-c", "ip link set dev bond-frontal type bond mode balance-alb; ip link set bond-frontal up; ifenslave bond-frontal eth1 eth2 eth3 eth4; ip a add 172.23.42.254/24 dev bond-frontal; ip a add 172.23.42.1/24 dev bond-frontal; ip a add 91.243.117.240/32 dev bond-frontal; ip link add link bond-frontal name internet type vlan id 4; ip link set internet up; sysctl -w net.ipv4.ip_forward=1;" ]
|
||||
# net: /run/netns/nginx
|
||||
# runtime:
|
||||
# interfaces:
|
||||
|
|
@ -81,11 +81,11 @@ onboot:
|
|||
net: /run/netns/fic-frontend
|
||||
- name: sshd-ip-setup
|
||||
image: linuxkit/ip:6cc44dd4e18ddb02de01bc4b34b5799971b6a7bf
|
||||
command: ["/bin/sh", "-c", "ip a add 10.10.10.2/29 dev eth0; ip link set eth0 up;" ]
|
||||
command: ["/bin/sh", "-c", "ip a add 10.10.10.2/29 dev eth2; ip link set eth2 up;" ]
|
||||
net: new
|
||||
runtime:
|
||||
interfaces:
|
||||
- name: eth0
|
||||
- name: eth2
|
||||
bindNS:
|
||||
net: /run/netns/sshd
|
||||
- name: auth-ip-setup
|
||||
|
|
@ -420,7 +420,7 @@ files:
|
|||
[0:0] -A INPUT -m conntrack --ctstate INVALID -j DROP
|
||||
[0:0] -A INPUT -p icmp -j ACCEPT
|
||||
[0:0] -A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
|
||||
[0:0] -A INPUT -i eth0 -s 10.10.10.0/29 -p tcp -m conntrack --ctstate NEW -m tcp --dport ssh -j ACCEPT
|
||||
[0:0] -A INPUT -i eth2 -s 10.10.10.0/29 -p tcp -m conntrack --ctstate NEW -m tcp --dport ssh -j ACCEPT
|
||||
[0:0] -A INPUT -j LOG
|
||||
[0:0] -A FORWARD -j LOG
|
||||
[0:0] -A OUTPUT -o lo -j ACCEPT
|
||||
|
|
|
|||
Reference in a new issue