[fixed] replacement error & /etc/sysctl.conf path fixed#59
[fixed] replacement error & /etc/sysctl.conf path fixed#59DG9Jww wants to merge 2 commits intoiw4p:masterfrom
Conversation
iw4p
left a comment
There was a problem hiding this comment.
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
| # 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.
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.
can you tell me what's the reason behind these two changes?
| iptables -t nat -A POSTROUTING -j MASQUERADE | ||
| sed -i -e 's@#net.ipv4.ip_forward=@net.ipv4.ip_forward=@g' /etc/sysctl.conf | ||
| #sed -i -e 's@#net.ipv4.ip_forward=@net.ipv4.ip_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.
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.