Skip to content

Conversation

@DG9Jww
Copy link

@DG9Jww DG9Jww commented Dec 15, 2025

After running the installation script, I found some issues.

  1. The OS I used was Debain >6.12. However, there's no /etc/sysctl.conf file. The new version use /etc/sysctl.d/xxx more to set up.
  2. When I checked the /etc/ocserv/ocserv.conf, there were some error:
    • try-mtu-discovery = truefalse
    • cisco-client-compat = true = true

So I updated the match rules.

Copy link
Owner

@iw4p iw4p left a 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

# 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=''
Copy link
Owner

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
Copy link
Owner

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.
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants