Giter Club home page Giter Club logo

Comments (2)

AJNOURI avatar AJNOURI commented on September 25, 2024 1

The solution was
1) Set the interface br-ex with the router gateway IP
sudo ip a a 172.24.4.225/28 dev br-ex

2) Set NAT on the host using iptables to allow traffic from br-ex to go outside using host IP

iptables -I FORWARD -i br-ex -j ACCEPT 
iptables -I FORWARD -o br-ex -j ACCEPT
sudo iptables -t nat -I POSTROUTING -s 172.24.4.0/28 ! -d 172.24.4.0/28 -j MASQUERADE

Now works like a charm:
selection_533

from coa.

AJNOURI avatar AJNOURI commented on September 25, 2024

The solution is top put the cloud public GW IP (172.24.4.225) on the br-ex bridge and configure NAT to allow traffic from 172.24.4.0/28 (default RDO AIO public network) to go outside the interface econnected to your outside world (eno1677736 in the case of RDO AIO default settings):

Temporary settings

enable routing (/etc/sysctl.conf)
sysctl -w net.ipv4.ip_forward = 1

Bring br-ex interface up and set its ip to router GW:

ifconfig br-ex up
ip a a 172.24.4.225/28 dev br-ex

Configure NAT on br-ex

iptables -I FORWARD -i br-ex -j ACCEPT 
iptables -I FORWARD -o br-ex -j ACCEPT
iptables -t nat -I POSTROUTING -s 172.24.4.0/28 ! -d 172.24.4.0/28 -j MASQUERADE

Persistent settings:

vi accessoutside

#!/bin/bash
sysctl -w net.ipv4.ip_forward = 1
ifconfig br-ex up
ip a a 172.24.4.225/28 dev br-ex
iptables -I FORWARD -i br-ex -j ACCEPT 
iptables -I FORWARD -o br-ex -j ACCEPT
iptables -t nat -I POSTROUTING -s 172.24.4.0/28 ! -d 172.24.4.0/28 -j MASQUERADE

Then make the script load at start:

cp accessoutside /etc/init.d/accessoutside
echo "/etc/init.d/accessoutside" >> /etc/rc.local

from coa.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.