Hello,
Here is what I'm trying to build:
https://debian-facile.org/images/fil...a2a3f96a3f1737
Thanks to Kawer for the schema !
(B) has 2 interfaces:
- ens33: in bridge DHCP
- ens34: network segment shared with (A), static IP addr
Access to the box is done by Wifi.
(A) and (B) are 2 VMs running on (D).
The idea is to have a workstation (A), completely isolated from the rest of the network (192.168.1...), however accessing the web (via ISP box E).
Hyper classic!... you might say.
Yes, indeed, but as things stand, I just manage to ping from A to C and ping is KO (good thing!) from A to D.
B easily accesses the internet (wget a.io: OK).
I managed to get the router to work in "non-persistent" mode, I struggle to get a persistent config after reboot.
On A and B I did:
Code:
echo "nameserver 8.8.8.8" > /etc/resolv.conf
There, I admit, I don't see anything anymore, it must be very silly but I need an outside look!
NB: all screenshots below were made on (B), except the last one, made on (A).
Please, could you help me to troubleshoot this case ?
(no copy/past possible from the VM in text mode)
https://www.cjoint.com/doc/23_02/MBg...d-document.png
NB: from A, ping 8.8.8.8 does not respond.
---
In fact, problem in on VM (A).
To get web access, I always have to type :
Code:
route add default gw 10.0.60.1
Impossible to make this f*ck!ng route persistante in /etc/interfaces
I tried many many syntaxes in /etc/network/interfaces tomake default gw route persistent but without success.
So, I tried to run this command in rc.local , it won't work !
When starting VM (A), I get:
"Failed to start /etc/rc.local Compatibility"
In comments, unsuccessful tries I've done:
Code:
root@secbrowser:~# more /etc/rc.local
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
# Set here because does not work in "interfaces" file :(
/usr/bin/date >> /root/rclocal_debug_STP.txt
#/usr/bin/echo "route flush..." >> /root/rclocal_debug_STP.txt
#/usr/sbin/ip route flush table main
#/usr/bin/echo "route del..." >> /root/rclocal_debug_STP.txt
#/usr/sbin/ip route del default via 10.0.60.1 dev ens33 onlink
/usr/bin/echo "route add..." >> /root/rclocal_debug_STP.txt
/usr/sbin route add default gw 10.0.60.1
#/usr/sbin/ip route add default gw 10.0.60.1
#/usr/sbin/ip route add default 192.168.1.0/24 via 10.0.60.1
/usr/bin/echo "fin OK!"
exit 0
rc.local runs well according to my "log" but fails just with route add default gateway command !!!
Code:
root@secbrowser:~# more rclocal_debug_STP.txt
route add...
route del...
route flush...
route add...
route flush...
route add...
jeu. 23 févr. 2023 23:34:44 CET
route flush...
route add...
jeu. 23 févr. 2023 23:42:00 CET
route flush...
route add...
jeu. 23 févr. 2023 23:49:00 CET
route add...
jeu. 23 févr. 2023 23:53:07 CET
route add...
ven. 24 févr. 2023 21:26:31 CET
route add...
root@secbrowser:~#
Any smart idea ?
---
Is there a known bug with "persistent default gateway" ?
Do you see where the problem can come from ???
At your disposal for any further information.
Thank you in advance.
Regards,
Steve.