Skip to content
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

Internet not working on VPS after installation with Wireguard client #87

Open
mcn18 opened this issue Aug 2, 2023 · 8 comments
Open

Comments

@mcn18
Copy link

mcn18 commented Aug 2, 2023

I have installed the VPS script on debian 11 successfully and then after reboot I can't connect to the internet via the VPS or to the VPS via SSH.

In my setup, i have a Wireguard client running on the VPS that provides a IPv4 block and an IPv6 block on interface called gw. I edited the script so that WIREGUARD="no", INTERFACE="gw", and VPS IP and HOSTNAME are set to the Wireguard public IPv4 address.

How can I get internet working correctly on this setup? Thanks!

@Ysurac
Copy link
Owner

Ysurac commented Aug 2, 2023

shorewall is started during script installation and only traffic needed by OpenMPTCProuter is allowed. With your configuration this block all traffic on the real interface, so this also block wireguard and all access.
You can set INTERFACE to your real interface or disable "systemctl -q restart shorewall" line in the VPS install script and set shorewall configuration manually before restarting the VPS.

@mcn18
Copy link
Author

mcn18 commented Aug 2, 2023

Okay, thank you. How would I allow all traffic on my real interface via shorewall?

@mcn18
Copy link
Author

mcn18 commented Aug 2, 2023

Also, my /etc/shorewall/interfaces already shows both interfaces.

net     enp1s0  dhcp,nosmurfs,tcpflags,routefilter,sourceroute=0
net     gw      dhcp,nosmurfs,tcpflags,routefilter,sourceroute=0

@Ysurac
Copy link
Owner

Ysurac commented Aug 2, 2023

In most case, it's better to configure wireguard after VPS installation.
You should already have access to the VPS with this configuration (SSH on port 65222) if you don't have another running firewall.
Then you can look at others VPN configurations to show what is needed in shorewall (like wg+ that is the default wireguard interface config).

@mcn18
Copy link
Author

mcn18 commented Aug 2, 2023

If I configure wireguard after the installation, how would I tell OMR to use the Public IP from the WG interface?

@mcn18
Copy link
Author

mcn18 commented Aug 2, 2023

The only reason I am using Wireguard is to get Public IPv4 and IPv6 from my BGP router to use with OMR. If you have a better way to tunnel these IPs to my OMR VPS that would make this easier, I am open to suggestions.

@Ysurac
Copy link
Owner

Ysurac commented Aug 2, 2023

If default route on the VPS is WG interface, then output will be on this route.

@mcn18
Copy link
Author

mcn18 commented Aug 24, 2023

@Ysurac can you tell me how to allow traffic on both my ethernet interface "enp1s0" and my wireguard interface "wg1". I cannot figure out how to do this in Shorewall. Thanks

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

No branches or pull requests

2 participants