Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
N
nextgen-router
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
nextgen-router
Commits
5614e835
Commit
5614e835
authored
Feb 03, 2021
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix initialize and resolv
parent
27802c5a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
9 deletions
+14
-9
files/utility.sh.j2
files/utility.sh.j2
+11
-8
network.yaml
network.yaml
+2
-0
tasks/resolve.yaml
tasks/resolve.yaml
+1
-1
No files found.
files/utility.sh.j2
View file @
5614e835
...
...
@@ -12,7 +12,7 @@ restore_mark() {
}
ppp_origin() {
initialize
_ipset
initialize
OPTION=$1
INTERFACE=$2
MARK=$[1000 + $(echo "$INTERFACE" | sed "s/ppp//g")]
...
...
@@ -21,19 +21,22 @@ ppp_origin() {
# ip6tables -t mangle "$OPTION" PREROUTING ! -p ospf -i "$INTERFACE" -j CONNMARK --set-xmark "$MARK"
}
initialize_ipset() {
ipset restore -f {{ansible_user_dir}}/nextgen-router/localnet-ipset && \
initialize_process() {
{% for subnet in localnets %}
ip rule add pref 80 to {{subnet}} lookup main && \
ip rule add pref 80 to {{subnet}} lookup main
{% endfor %}
ip rule add pref 80 to 172.16.0.0/12 lookup main && \
iptables-restore --noflush {{ansible_user_dir}}/iptables-gateways && \
arp -f
ip rule add pref 80 to 172.16.0.0/12 lookup main
arp -f
}
initialize() {
ipset restore -f {{ansible_user_dir}}/nextgen-router/localnet-ipset && \
initialize_process
true
}
eth_origin() {
initialize
_ipset
initialize
OPTION=$1
BRIDGE_NAME=$2
GATEWAY_ID=$3
...
...
network.yaml
View file @
5614e835
...
...
@@ -32,6 +32,7 @@
file
:
name
:
/etc/ethers
state
:
touch
changed_when
:
false
-
name
:
clean some rubbish packages
become
:
true
apt
:
...
...
@@ -46,6 +47,7 @@
file
:
name
:
'
{{ansible_user_dir}}/iptables-gateways'
state
:
touch
changed_when
:
false
-
name
:
iptables-gateways stuff
copy
:
src
:
./files/iptables-gateways/{{item}}
...
...
tasks/resolve.yaml
View file @
5614e835
...
...
@@ -5,7 +5,7 @@
nameserver 127.0.0.1
{% for br in bridges %}
{% if not (br.masq is defined and br.masq) and br.address is defined and br.address %}
nameserver {{ br.address | regex_replace("/\d+$", "") }}
#
nameserver {{ br.address | regex_replace("/\d+$", "") }}
{% endif %}
{% endfor %}
{% for dns in smartdns.china_dns %}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment