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

Question about --allow-host-access #284

Open
for-coursera opened this issue Nov 7, 2024 · 7 comments
Open

Question about --allow-host-access #284

for-coursera opened this issue Nov 7, 2024 · 7 comments

Comments

@for-coursera
Copy link

With --allow-host-access option, vopono tries to resolve localhost after connecting and seems to fail with this message (I used it together with --protocol openvpn --custom):

sudo: unable to resolve host MyHostname: Name or service not known

Can this be avoided or probably suppressed somehow? AFAIR, it wasn't like that in some previous versions :)

@jamesmcm
Copy link
Owner

jamesmcm commented Nov 8, 2024

It just sets this firewall rule -

pub fn open_hosts(

And adds it to the network namespace hosts file as vopono.host

I don't see this error myself (although I normally use Wireguard) - could you post the full command and log with --verbose ?

@for-coursera
Copy link
Author

Thanks for your comments!

Here goes the command:

vopono --verbose exec --custom ~/.config/vpn/vpn.udp.ovpn --allow-host-access --protocol openvpn xterm

And the log: https://pastebin.com/raw/FDH4RJdL

@jamesmcm
Copy link
Owner

jamesmcm commented Nov 9, 2024

I can't replicate this myself is your hostname set in /etc/hostname ?

Also don't run xterm like this - as it's just the Terminal Emulator, you should run the shell itself in vopono (e.g. bash) to ensure it is spawned inside the network namespace.

@jamesmcm
Copy link
Owner

jamesmcm commented Nov 9, 2024

Oh and what does the OpenVPN .ovpn file look like? As maybe it is coming from there? As vopono doesn't use the host machine's hostname anyway as far as I can tell.

@for-coursera
Copy link
Author

for-coursera commented Nov 9, 2024

@jamesmcm

Again, thanks for replying!

As per your questions:

is your hostname set in /etc/hostname

Yes.

what does the OpenVPN .ovpn file look like?

It has no up / down scripts if that's what you asking. Besides, it doesn't happen with vopono v.0.10.9 :)

@jamesmcm
Copy link
Owner

jamesmcm commented Nov 9, 2024

And does the hosts file in /etc/netns/{ns_name}/hosts look like when it's running?

The only difference was to add the host IP (from the netns perspective) there, but that should use the IP address of the host from the netns, and shouldn't trigger a DNS lookup.

@for-coursera
Copy link
Author

the hosts file in /etc/netns/{ns_name}/hosts look like when it's running?

Like this:

10.200.1.1 vopono.host

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