-
Notifications
You must be signed in to change notification settings - Fork 151
[fixed] replacement error & /etc/sysctl.conf path fixed #59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
iw4p
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! It's a good idea to support Debian too if you don't want to use docker, but we should keep it compatible for both linux distributions and not just removed the old things because of Debian. I suggest to have switch cases or if-else statements for deciding to use which one or make it auto detect via reading the server configs to realizing the distribution
ocserv-install.sh
Outdated
| # need to fill up your domain name or IP here | ||
| # If you want to use domain name, you gotta setup DNS A record at first. | ||
| # For instance: vpn.yourdomain.com x.x.x.x | ||
| ip='' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of making it '', let's make it optional so if user skipped and pushed enter, it uses the IP otherwise first ask user to add their domain or anything they want
| sed -i -e 's@route =@#route =@g' /etc/ocserv/ocserv.conf | ||
| sed -i -e 's@no-route =@#no-route =@g' /etc/ocserv/ocserv.conf | ||
| sed -i -e 's@cisco-client-compat@cisco-client-compat = true@g' /etc/ocserv/ocserv.conf | ||
| sed -i 's|^[# ]*cisco-client-compat.*|cisco-client-compat = true|' ocserv.conf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you tell me what's the reason behind these two changes?
| iptables -t nat -A POSTROUTING -j MASQUERADE | ||
| sed -i -e 's@#[email protected]_forward=@g' /etc/sysctl.conf | ||
| #sed -i -e 's@#[email protected]_forward=@g' /etc/sysctl.conf | ||
| #The config file might be different in different OS. The command below works for debain 6.12.48. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of making this specific and customized for Debian, let's find out the distro and decide based on that
After running the installation script, I found some issues.
/etc/sysctl.conffile. The new version use/etc/sysctl.d/xxxmore to set up./etc/ocserv/ocserv.conf, there were some error:So I updated the match rules.