thing is when I called the ifconfig, the ethernet showed the public IP address, so I suspect the VPC I rented is on dhcp.
also i changed some config on /etc/network/interfaces as following
#source /etc/network/interfaces.d/*
Code: Select all
auto lo
iface lo inet loopback
auto br0
iface br0 inet static
address x.x.x.46 // this one is the public IP from ifconfig
netmask 255.255.255.0
gateway x.x.x.173 /// this one i retrieve from typing route -n
bridge_ports ens3
bridge_stp off
bridge_fd 0
bridge_maxwait 0
ifconfig result:
Code: Select all
br0 Link encap:Ethernet HWaddr 56:00:03:00:b3:9f
inet addr:x.x.x.46 Bcast:x.x.x.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:12467 errors:0 dropped:0 overruns:0 frame:0
TX packets:10929 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:8891080 (8.8 MB) TX bytes:1590896 (1.5 MB)
ens3 Link encap:Ethernet HWaddr 56:00:03:00:b3:9f
UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1
RX packets:424967 errors:0 dropped:0 overruns:0 frame:0
TX packets:403862 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:288017618 (288.0 MB) TX bytes:287691949 (287.6 MB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:54 errors:0 dropped:0 overruns:0 frame:0
TX packets:54 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:6296 (6.2 KB) TX bytes:6296 (6.2 KB)
tap0 Link encap:Ethernet HWaddr fa:7b:1b:c7:33:9b
UP BROADCAST PROMISC MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
bridge status:
bridge name bridge id STP enabled interfaces
br0 8000.56000300b39f no ens3
tap0
Server config
1
port 443
2
proto udp
3
dev tap0
4
dev-node tap-bridge
5
ca ca.crt
6
cert server.crt
7
key server.key
8
client-to-client
9
dh dh2048.pem
10
topology subnet
11
ifconfig-pool-persist ipp.text
12
server-bridge (public IP) 255.255.255.0 (public IP).100 (public IP).255 // I FEEL THIS IS VERY WRONG BUT IDK WHAT TO PUT :<
13
push "redirect-gateway def1 bypass-dhcp"
14
push "dhcp-option DNS 208.67.222.222"
15
push "dhcp-option DNS 208.67.220.220"
16
keepalive 10 120
17
tls-auth ta.key 0
18
cipher AES-128-CBC
19
auth SHA256
20
comp-lzo
21
user nobody
22
group nogroup
23
persist-key
24
persist-tun
Client config
1
client
2
dev tap
3
dev-node tap-bridge
4
proto udp
5
remote host 443
6
resolv-retry infinite
7
nobind
8
user nobody
9
group nogroup
10
persist-key
11
persist-tun
12
ca ca.crt
13
cert client.crt
14
key client.key
15
cipher AES-128-CBC
16
auth SHA256
17
remote-cert-tls server
18
key-direction 1
19
comp-lzo
20
verb 6
the openVPN return this error:
Code: Select all
Fri Oct 09 17:25:38 2020 us=567015 read UDP: Unknown error (code=10054)
I managed to connect with TUN already but when I start the bridge config I just cant connect the VPN to the server. I needed the bridge so I can connect client to client