-
Notifications
You must be signed in to change notification settings - Fork 146
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
Could you elaborate on what routing needs to be done for MacOs? #57
Comments
This comment was marked as outdated.
This comment was marked as outdated.
As for the routing needed - you need to add routes for |
I am also confused by this. The fn main() {
let mut config = tun::Configuration::default();
config.address((10, 0, 0, 1))
.netmask((255, 255, 255, 0))
.up();
let mut dev = tun::create(&config).unwrap();
let mut buf = [0; 4096];
loop {
let amount = dev.read(&mut buf).unwrap();
println!("{:?}", &buf[0 .. amount]);
}
} Then running the command
The address is exactly the set one. However, when I run |
The route on MacOS needs to be set manually, unfortunately. See my comment above. |
Could you please tell me what value I should manually set for the "route"? Should I set the value with |
For the TUN interface you posted, the appropriate route would probably be:
|
Thanks, It works for me. What does the route mean here? Why should I set it as |
It depends on what traffic you want to send over the tunnel. If you want to route traffic to devices with IP addresses in a |
Thanks. IIUC, this means, all access to |
Yes. |
@M0dEx Hi, I still have an issue with the routing, If I set the routing to
Then, with the ICMP packet
which is produced by My prior understanding is that if I set the route with |
This is because the |
Thanks, that means, I don't need to worry about a packet written by the So, it seems to be the interpretation of the example of the simpletun. The client ran on machine
and its real physical address of
the physical address of In this whole process, note the emphasized part, the packet with |
I'm not sure whether I 100% understand your answers. With the default code in https://github.com/meh/rust-tun/blob/master/examples/ping-tun.rs, and set the route for
When I run the command |
I'm referring to this section of the readme:
I'm not receiving any packets on my MacOs (similar to #53). Here's my skeleton setup:
I see this device in my ifconfig output:
The text was updated successfully, but these errors were encountered: